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
In the case of a regular Lock, I'd use a condition variable, which will automatically relinquish the lock. Unfortunately, for this case, I can't do that. It'd be nice to have a mutex.withoutLock { ... } or equivalent for this case.
The text was updated successfully, but these errors were encountered:
This would be incredibly useful to me. For example, using recursive functions. IMO this should just be an inline function equating the the code sample in the OP. AFAIK there is no better alternative than Mutex for this use case, unless a reentrant lock is added (which was previously rejected in #1686).
I find myself doing this pattern a lot:
In the case of a regular
Lock
, I'd use a condition variable, which will automatically relinquish the lock. Unfortunately, for this case, I can't do that. It'd be nice to have amutex.withoutLock { ... }
or equivalent for this case.The text was updated successfully, but these errors were encountered: