https://kotlinlang.org logo
#coroutines
Title
# coroutines
j

Jonathan

03/16/2018, 4:56 PM
Is it planned to have a rentrant mutex?
e

elizarov

03/16/2018, 6:18 PM
Nope. Reentrant mutex is conceptually incompatible with coroutines. Coroutines are ephemeral. They don’t even have identity. Any work that coroutine is doing can be decomposed to a work for another coroutine at any time. How would you define “reentrancy” in this world?
However, we might consider limited reentrancy with respect to user-provided token or identifier of the owner.
j

Jonathan

03/16/2018, 7:06 PM
Yes, indeed it makes sense. Thanks for the answer
2 Views