Created
December 8, 2019 20:29
-
-
Save juliuscanute/c288bb4e37d17ab27b1caca2c55f0b87 to your computer and use it in GitHub Desktop.
[Creating a work stealing Executor] #kotlin #coroutine #android
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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