You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
navigator.locks.request('foo',async()=>{navigator.locks.request('foo',async()=>{// This will block...})})
If an exclusive lock is requested by the same context that already owns the lock, it would be nice to have the ability for that to just work...
navigator.locks.request('foo',{reentrant: true},async()=>{navigator.locks.request('foo',async()=>{// This would succeed.})})
The above example is pretty silly, of course. The use case I'm considering are when the callback invoked comes from a different source, or some further down dependency is requesting the lock... e.g.
Unless I'm missing something, this would require careful testing to ensure this sharing depends on a clearly defined boundary and not something implementation-defined. I guess you want to compare agents.
Acquired locks are currently not reentrant...
If an exclusive lock is requested by the same context that already owns the lock, it would be nice to have the ability for that to just work...
The above example is pretty silly, of course. The use case I'm considering are when the callback invoked comes from a different source, or some further down dependency is requesting the lock... e.g.
The text was updated successfully, but these errors were encountered: