kotlinx.coroutines icon indicating copy to clipboard operation
kotlinx.coroutines copied to clipboard

rx Flowable that use Unconfined dispatcher result in a deadlock when using a runblocking() that execute a suspend function with (Semaphore, mutex or ReentrantLock)

Open cchaouachi opened this issue 1 year ago • 1 comments
trafficstars

Hello,

This code result in a deadlock :

sharedFlow.asFlowable(Unconfined)
            .flatMap {
 runBlocking {
            suspend function with (Mutex , Semaphore or  ReentrantLock) --> This code deadlocks here
        }
}

when we change the Unconfined dispatcher to the Default the problem disappear? is it the intended behavior ? I found a similar issue but with blockingGet

cchaouachi avatar Sep 09 '24 13:09 cchaouachi