rocketraman
09/13/2018, 5:31 PMnewSingleThreadContext and was passing that to launch. Is the right way to do this to now create a CoroutineScope that encapsulates that dispatcher, and then call launch with that scope?rocketraman
09/13/2018, 5:42 PMCoroutineScope there is an explicit job created. Is this necessary or something specific to the Android example? I don't appear to need it in my case but want to make sure I'm not missing something.rocketraman
09/13/2018, 5:43 PMshutdown method of this class, I had threadContext.close() -- is coroutineContext.cancel() a sufficient replacement for this?rocketraman
09/13/2018, 7:15 PMCoroutineScope docs does job.cancel() rather than this.cancel(). Shouldn't cancelling the coroutine scope cancel the job too?elizarov
09/13/2018, 9:49 PMlaunch(ctx) you can replace it with GlobalScope.launch(ctx) — does same thingelizarov
09/13/2018, 9:51 PMelizarov
09/13/2018, 9:52 PMelizarov
09/13/2018, 9:53 PMthis.cancel(). Must be job.cancel()rocketraman
09/13/2018, 9:54 PMCoroutineScope and now have:
override val coroutineContext: CoroutineContext = newSingleThreadContext("...")rocketraman
09/13/2018, 9:54 PMCoroutineContext does not have close method to close the thread context of ThreadPoolDispatcher.elizarov
09/13/2018, 9:54 PMrocketraman
09/13/2018, 9:54 PMelizarov
09/13/2018, 9:55 PMrocketraman
09/13/2018, 9:58 PMCoroutineContext that are not Android-specific would be nice... I may submit a pull for this 🙂rocketraman
09/13/2018, 9:58 PMcoroutineContext.cancel() at all?ianbrandt
09/13/2018, 10:02 PMrocketraman
09/13/2018, 10:03 PM