Browse Source
* Add IDE resolution warning for examples sharing JVM & Android code. * Use Ktor to remove JVM-specific networking code from common source set Fix resolution for Picture class via expect/actual mechanism Co-authored-by: Sebastian Aigner <sebastian.aigner@jetbrains.com>pull/52/head
Sebastian Aigner
4 years ago
committed by
GitHub
9 changed files with 59 additions and 38 deletions
@ -0,0 +1,9 @@
|
||||
package example.imageviewer.utils |
||||
|
||||
import kotlinx.coroutines.CoroutineScope |
||||
import kotlin.coroutines.CoroutineContext |
||||
|
||||
actual fun <T> runBlocking( |
||||
context: CoroutineContext, |
||||
block: suspend CoroutineScope.() -> T |
||||
): T = kotlinx.coroutines.runBlocking(context, block) |
@ -0,0 +1,7 @@
|
||||
package example.imageviewer.utils |
||||
|
||||
import kotlinx.coroutines.CoroutineScope |
||||
import kotlin.coroutines.CoroutineContext |
||||
import kotlin.coroutines.EmptyCoroutineContext |
||||
|
||||
expect fun <T> runBlocking(context: CoroutineContext = EmptyCoroutineContext, block: suspend CoroutineScope.() -> T): T |
@ -0,0 +1,9 @@
|
||||
package example.imageviewer.utils |
||||
|
||||
import kotlinx.coroutines.CoroutineScope |
||||
import kotlin.coroutines.CoroutineContext |
||||
|
||||
actual fun <T> runBlocking( |
||||
context: CoroutineContext, |
||||
block: suspend CoroutineScope.() -> T |
||||
): T = kotlinx.coroutines.runBlocking(context, block) |
Loading…
Reference in new issue