Closed syg closed 4 years ago
is there any way to have DoWait be a synchronous abstract operation, but have waitAsync turn the strings into a Promise, or set the Waiter Record's [[PromiseCapability]] slot to a capability?
Dunno, maybe? I'm not exactly sure what you have in mind with DoWait being a synchronous operation. I'd be happy to review a patch here, but as is I still think a duplicated copy is clearer than any refactoring here, since there are only two copies.
Per discussion; i'll defer to your judgement here that the refactor isn't cleaner. Feel free to close.
@ljharb A refactored AO has a lot of branches inside depending on sync/async that I think makes it more confusing to read.