Fix MultiMutex unlock when cancelled

This commit is contained in:
Koitharu
2025-08-05 14:02:46 +03:00
parent a090965a2d
commit 5ac9bad728

View File

@@ -31,8 +31,8 @@ open class MultiMutex<T : Any> {
contract {
callsInPlace(block, InvocationKind.EXACTLY_ONCE)
}
lock(element)
return try {
lock(element)
block()
} finally {
unlock(element)