From 57401b4e5e3138e264f3441db1f9c54292f659f5 Mon Sep 17 00:00:00 2001 From: nathan Date: Wed, 12 Aug 2020 11:20:26 +0200 Subject: [PATCH] Added more comments --- src/dorkbox/network/other/SuspendWaiter.kt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/dorkbox/network/other/SuspendWaiter.kt b/src/dorkbox/network/other/SuspendWaiter.kt index 1eeec056..0cbe1afc 100644 --- a/src/dorkbox/network/other/SuspendWaiter.kt +++ b/src/dorkbox/network/other/SuspendWaiter.kt @@ -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 = Channel(0)) { // "receive' suspends until another coroutine invokes "send"