Hi, I have a scope/job launching multiple coroutines, containing loops such as
Copy code
launch {
for (message in inputChannel) {
try {
message.returnValue = taskExecutor.handle(message.message)
} catch (e: Throwable) {
message.throwable = e
logError(message, e)
} finally {
outputChannel.send(message)
}
}
}
is there a way to know when all children coroutines are waiting? (basically everything is done, and the coroutine waits for new message in channels) ??