Skip to content

Instantly share code, notes, and snippets.

@juliuscanute
Created December 8, 2019 20:29
Show Gist options
  • Select an option

  • Save juliuscanute/c288bb4e37d17ab27b1caca2c55f0b87 to your computer and use it in GitHub Desktop.

Select an option

Save juliuscanute/c288bb4e37d17ab27b1caca2c55f0b87 to your computer and use it in GitHub Desktop.
[Creating a work stealing Executor] #kotlin #coroutine #android
fun main() {
val executorDispatcher = Executors
.newWorkStealingPool().asCoroutineDispatcher()
GlobalScope.launch(context = executorDispatcher) {
println(Thread.currentThread().name)
}
Thread.sleep(50)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment