3 ms·
Why can't we just `await` the lock call? Edit: Nevermind, release of the lock is automatic when the callback resolves its promise. I get it now.
by chrisfosterelli 2y ago
Why can't we just `await` the lock call?
Edit: Nevermind, release of the lock is automatic when the callback resolves its promise. I get it now.
- KTibow 2y agoIf you really wanted it to be at the top level you could probably turn it into an explicit `release` call using a wrapper and two `Promise` constructors, though that would probably be a bad idea since it could introduce bugs