-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
naming for mutex.lock
/mutex.tryLock
#29
Comments
|
Sorry, yes, referring to the callback-taking version in the readme: mutex.lock(function runsUnderLock() {
// Do critical section stuff
});
|
I'm writing the spec draft right now and sorely need to update the README, but I'm moving away from the callback taking version to start in favor of either the simple lock/unlock for flexibility in the future with dispose, or the token. I need to noodle on the token thing some more, will reply in the other thread. |
Swift calls these
withLock
andwithLockIfAvailable
, which I think are better names.I'd kind of expect the mutex to be locked after a call to
mutex.lock(...)
, which it isn't.And
try
in JS usually means something to do with exceptions; it's a bit weird to see it used in another context.The text was updated successfully, but these errors were encountered: