jeggy
06/14/2020, 5:23 PMyield()
every now and then all around in the code, so if any cancelation is requested that all my coroutines will cancel? And if so, how expensive is it to call yield
?octylFractal
06/14/2020, 5:30 PMensureActive()
because that won't suspend at all, unlike yield()
. suspending is not too expensive, but it does stop work for a tiny bitjeggy
06/14/2020, 5:36 PMensureActive
upon each iteration?octylFractal
06/14/2020, 5:42 PMjeggy
06/14/2020, 5:45 PMwithTimeout
and then I had some problems with it that it still went on for some minutes after it should have been canceled. So I'm just trying to figure out what's the best way to really cancel the execution.octylFractal
06/14/2020, 5:47 PMjeggy
06/14/2020, 5:47 PMensureActive()
each time I'm calling the provided lambda by the user of this library 🙂jeggy
06/14/2020, 5:48 PMoctylFractal
06/14/2020, 5:49 PMjeggy
06/14/2020, 5:50 PMoctylFractal
06/14/2020, 5:51 PMjeggy
06/14/2020, 5:52 PMfun resolver(function: suspend (T) -> R)
This is the function I'm exposing from this library. But it could be that the code provided is using some blocking code.octylFractal
06/14/2020, 5:53 PMjeggy
06/14/2020, 5:54 PMensureActive
, and see how it works with big data sets