add doSynchronously

This commit is contained in:
InsanusMokrassar 2021-05-10 19:20:57 +06:00
parent 702c5a3e5d
commit e9223d5502
2 changed files with 5 additions and 0 deletions

View File

@ -10,6 +10,8 @@
* `Klock`: `2.0.7` -> `2.1.0` * `Klock`: `2.0.7` -> `2.1.0`
* `UUID`: `0.2.4` -> `0.3.0` * `UUID`: `0.2.4` -> `0.3.0`
* **ALL DEPRECATIONS WERE REMOVED** * **ALL DEPRECATIONS WERE REMOVED**
* `Coroutines`:
* New extension and function `doSynchronously` which are the same as `launchSynchronously`
## 0.4.36 ## 0.4.36

View File

@ -27,3 +27,6 @@ fun <T> CoroutineScope.launchSynchronously(block: suspend CoroutineScope.() -> T
} }
fun <T> launchSynchronously(block: suspend CoroutineScope.() -> T): T = CoroutineScope(Dispatchers.Default).launchSynchronously(block) fun <T> launchSynchronously(block: suspend CoroutineScope.() -> T): T = CoroutineScope(Dispatchers.Default).launchSynchronously(block)
fun <T> CoroutineScope.doSynchronously(block: suspend CoroutineScope.() -> T): T = launchSynchronously(block)
fun <T> doSynchronously(block: suspend CoroutineScope.() -> T): T = launchSynchronously(block)