raniejade
08/09/2020, 3:48 AMErik
08/09/2020, 8:59 AMErik
08/09/2020, 9:01 AMCoroutineScope.async {} to produce a Deferred<T> that you can await(). That is already a quite flexible way to encapsulate an asynchronous result.raniejade
08/09/2020, 9:11 AMawait is clunky. My use case is in spek:
val m by memoized { ... }
// it block is a suspending block
it("doSomething") { f.doSomething() }
it("doAnother") { f.doAnother() }
I'm currently working on adding coroutine support in Spek, Each it will receive a unique instance of f and one improvement I want to do is to allow the two `it`s to be run in parallel. At the moment, the delegate that is backing f tracks the instance, I can't really make the two `it`s run in parallel as they share state. What I want to achieve is to store the state in the coroutineContext.raniejade
08/09/2020, 9:12 AM