We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Mutex.withLock
Describe the bug
What happened? What should have happened instead?
Prior to 5a570e1, you can return from a Mutex.withLock block and the mutex will unlock as expected.
return
After 5a570e1, the mutex will remain locked after the return.
Provide a Reproducer
If possible, please provide a small self-contained project (or even just a single file) where the issue reproduces.
val mutex = Mutex() suspend fun nonLocalReturn() { mutex.withLock { return } } fun main() { runBlocking { nonLocalReturn() println(mutex.isLocked) // should be false } }
The text was updated successfully, but these errors were encountered:
Oh, sorry. Dupe of #3985.
Sorry, something went wrong.
No branches or pull requests
Describe the bug
What happened? What should have happened instead?
Prior to 5a570e1, you can
return
from aMutex.withLock
block and the mutex will unlock as expected.After 5a570e1, the mutex will remain locked after the
return
.Provide a Reproducer
If possible, please provide a small self-contained project (or even just a single file) where the issue reproduces.
The text was updated successfully, but these errors were encountered: