How to register a Coroutine Scope?

To register a Coroutine Scope, you need to add a style to run Kotlin-like Coroutines.

This is the mode that helps you run Coroutines on the current thread.

$scope = new CoroutineScope(Dispatchers::DEFAULT);

This is the mode that helps you run Coroutines on separate threads.

$scope = new CoroutineScope(Dispatchers::IO);

Last updated