nwh
10/09/2018, 8:58 PMctx
to the launch
method redundant in this scenario?
val ctx = newSingleThreadContext("sample")
val scope = CoroutineScope(ctx)
scope.launch(ctx) { }
louiscad
10/09/2018, 10:02 PMvoddan
10/10/2018, 8:35 AMlaunch
accepts an optional context then? Can't the API be minimized to always use the scopes?louiscad
10/10/2018, 8:44 AMCoroutineContext
is folded with the context from the scope. That gives you structured concurrency, but you can still launch in another dispatcher, or add something to the scope's context.