Leak in the consumer
Closed this issue · 2 comments
viartemev commented
the offer
operation is not blocking, but it will return false if the queue is full. It's coroutines leak.
val delivery = suspendCancellableCoroutine<Delivery> { continuations.offer(it) }
viartemev commented
Possible options are:
put()
. At the same time, it's a blocking operation -> use special dispatcher for it?- Kotlin
Channel
, but you can't consume from the channel in theDeliveryCallback
viartemev commented
Channel
has sendBlocking
method