groostav
02/12/2019, 9:52 PMinputChannel.send(Input(inputValues))
select<Result> {
successChannel.onReceieve { Success }
errorChannel.onReceieve { Failed }
onTimeout(timeoutduration) {
inputChannel.send(CancellationRequest())
select<Unit> {
errorChannel.onReceive { Unit }
successChannel.onReceive { Unit }
}
}
}
Is that legal? I've only ever thought of the transform provided to onReceive as a (ref-transparent) adapter. Can I safely use it like this (avoiding races on errorChannel and successChannel?)