Last active
June 23, 2022 17:20
-
-
Save aqua30/3158a4ab9d8d8d5e61acf32982e7a8ad to your computer and use it in GitHub Desktop.
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
| runBlocking { | |
| Log.e("TAG","starting runBlocking") | |
| val job = launch { | |
| Log.e("TAG","starting launch block") | |
| repeat(1000) { | |
| Log.e("TAG","$it") | |
| delay(500) | |
| } | |
| } | |
| delay(2000) | |
| job.cancelAndJoin() | |
| Log.e("TAG","job cancelled") | |
| } | |
| Log.e("TAG","Printing normally on thread ${this.javaClass.name}") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment