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
Currently, if the callback use the release function, the lock is only released when release is called.
awaitlock.read(async()=>{// do somethingreturn;// this lock will be released})awaitlock.read(async(release)=>{// do something if(foo){// do somethingrelease();}// do somethingreturn;// this lock will NOT be released when foo === false})
Should we always release the lock when callback returns/throw? but then we can't keep the lock after the function returns.
Or, we always release the lock when the callback is async?
The text was updated successfully, but these errors were encountered:
Currently, if the callback use the
release
function, the lock is only released whenrelease
is called.Should we always release the lock when callback returns/throw? but then we can't keep the lock after the function returns.
Or, we always release the lock when the callback is async?
The text was updated successfully, but these errors were encountered: