LeoColman
01/16/2019, 3:52 PMThread.sleep(1000000)
. I wanted to interrupt this Co-routine, but it's impossiblemanueldidonna
01/16/2019, 3:59 PMmarstran
01/16/2019, 4:04 PMdelay
instead. Thread.sleep
blocks the thread.marstran
01/16/2019, 4:05 PMdelay
suspends the coroutine, so it will "react" on a cancellation.LeoColman
01/16/2019, 4:17 PMLeoColman
01/16/2019, 4:17 PMLeoColman
01/16/2019, 4:18 PMThread.sleep(forever)
, but I still need to interrupt itgildor
01/16/2019, 4:21 PMgildor
01/16/2019, 4:24 PMgildor
01/16/2019, 4:24 PMLeoColman
01/16/2019, 4:31 PMLeoColman
01/16/2019, 4:32 PMLeoColman
01/16/2019, 4:32 PMLeoColman
01/16/2019, 4:32 PMLeoColman
01/16/2019, 4:33 PMLeoColman
01/16/2019, 4:33 PMgildor
01/16/2019, 4:35 PMLeoColman
01/16/2019, 4:35 PMgildor
01/16/2019, 4:35 PMgildor
01/16/2019, 4:35 PMLeoColman
01/16/2019, 4:35 PMLeoColman
01/16/2019, 4:36 PMgildor
01/16/2019, 4:37 PMgildor
01/16/2019, 4:37 PMgildor
01/16/2019, 4:40 PMgildor
01/16/2019, 4:42 PMLeoColman
01/16/2019, 4:44 PMroutine.await()
will never complete, right?LeoColman
01/16/2019, 4:44 PMLeoColman
01/16/2019, 4:45 PMlouiscad
01/16/2019, 9:13 PMSystem.exit(someNonZeroIntegerValue)
? If your coroutine runs on a non blocked thread, it can still be around to call this and shutdown the VM with this call.LeoColman
01/17/2019, 11:20 AMlouiscad
01/17/2019, 12:01 PM