Luis Munoz
11/04/2019, 8:04 PMoctylFractal
11/04/2019, 8:06 PMThe code that is executing inside the block is cancelled on timeout and the active or next invocation of the cancellable suspending function inside the block throws a TimeoutCancellationException.so if you do not check for cancellation in the block, it will never time out
Luis Munoz
11/04/2019, 8:57 PMoctylFractal
11/04/2019, 9:33 PMblock
never checks for cancellation, it cannot be stopped pre-emptivelyoctylFractal
11/04/2019, 9:34 PMyield()
, channel.send()
, or many other cancellable functions in block
, it should work if the coroutine eventually hits one of themLuis Munoz
11/05/2019, 4:11 PMLuis Munoz
11/05/2019, 9:25 PMoctylFractal
11/05/2019, 9:36 PMtry-finally