Created
October 24, 2023 20:25
-
-
Save af2905/4fa4947295cebf54cea3827cb01ed03b to your computer and use it in GitHub Desktop.
fun_receive_data_suspend
This file contains 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
suspend fun receiveData(): String { | |
withContext(Dispatchers.IO) { | |
// Long asynchronous work is performed here. | |
} | |
return "Data received" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment