workflow-kotlin
workflow-kotlin copied to clipboard
Replace receiveOrNull with receiveOrClosed once released.
Starting in 1.3.0-RC, receiveOrClosed
exists – however it's marked as @InternalCoroutinesApi
. There are plans to make it public, but it's blocked by inline class stability (https://github.com/Kotlin/kotlinx.coroutines/pull/1343#discussion_r304082103).
Tried using the preview version of receiveOrClosed
, but turns out it's broken (https://github.com/Kotlin/kotlinx.coroutines/issues/1584) and caused a set of bugs with odd stacktraces (#626).
The referenced coroutines bug was fixed some time ago. Might want to give this another try.