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
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Deferred | |
import kotlinx.coroutines.async | |
import kotlinx.coroutines.awaitAll | |
import kotlinx.coroutines.coroutineScope | |
/** | |
* Runs a list of coroutine execution blocks in parallel, waits for all of them to complete, | |
* then returns a list of the return values. | |
* THis function will fail as soon as a single exception is thrown, and this function will |
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
import kotlinx.coroutines.CoroutineScope | |
import kotlinx.coroutines.Dispatchers | |
import kotlinx.coroutines.NonCancellable | |
import kotlinx.coroutines.SupervisorJob | |
import kotlinx.coroutines.cancel | |
import kotlinx.coroutines.sync.Mutex | |
import kotlinx.coroutines.sync.withLock | |
import kotlinx.coroutines.withContext | |
import kotlinx.coroutines.runBlocking | |
import kotlin.coroutines.CoroutineContext |