Added more comments

This commit is contained in:
nathan 2020-08-12 11:20:26 +02:00
parent 085dc30daf
commit 57401b4e5e

View File

@ -3,6 +3,7 @@ package dorkbox.network.other
import kotlinx.coroutines.channels.Channel
// this is bi-directional waiting. The method names to not reflect this, however there is no possibility of race conditions w.r.t. waiting
// https://stackoverflow.com/questions/55421710/how-to-suspend-kotlin-coroutine-until-notified
// https://kotlinlang.org/docs/reference/coroutines/channels.html
inline class SuspendWaiter(private val channel: Channel<Unit> = Channel(0)) {
// "receive' suspends until another coroutine invokes "send"