mirror of
https://github.com/InsanusMokrassar/MicroUtils.git
synced 2024-12-23 00:57:15 +00:00
doInDefault and doInIO
This commit is contained in:
parent
e9223d5502
commit
df4eaea4b9
@ -12,6 +12,7 @@
|
||||
* **ALL DEPRECATIONS WERE REMOVED**
|
||||
* `Coroutines`:
|
||||
* New extension and function `doSynchronously` which are the same as `launchSynchronously`
|
||||
* New extensions `doInDefault` and `doInIO`
|
||||
|
||||
## 0.4.36
|
||||
|
||||
|
@ -8,3 +8,11 @@ suspend inline fun <T> doInUI(noinline block: suspend CoroutineScope.() -> T) =
|
||||
Dispatchers.Main,
|
||||
block
|
||||
)
|
||||
suspend inline fun <T> doInDefault(noinline block: suspend CoroutineScope.() -> T) = withContext(
|
||||
Dispatchers.Default,
|
||||
block
|
||||
)
|
||||
suspend inline fun <T> doInIO(noinline block: suspend CoroutineScope.() -> T) = withContext(
|
||||
Dispatchers.IO,
|
||||
block
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user