damian
08/20/2019, 3:44 PMMarko Mitic
08/20/2019, 4:00 PMdamian
08/20/2019, 4:03 PMMarko Mitic
08/20/2019, 4:05 PMdamian
08/20/2019, 4:05 PMMarko Mitic
08/20/2019, 4:06 PMdamian
08/20/2019, 4:14 PMMarko Mitic
08/20/2019, 4:19 PMchannel.consumeEach {
//bit strange but avoids potential deadlock if callback happens on this thread (as Mutex is not reentrant lock)
mutex.lock()
mutex.unlock()
processResults(it)
}
onNotReady() {
mutex.lock()
}
onReady() {
mutex.unlock()
}