desktopMain.com.seiko.imageloader.util.Platform.kt Maven / Gradle / Ivy
package com.seiko.imageloader.util
import io.ktor.utils.io.ByteReadChannel
import io.ktor.utils.io.jvm.javaio.toInputStream
import okio.BufferedSource
import okio.buffer
import okio.source
actual typealias WeakReference = java.lang.ref.WeakReference
actual typealias LockObject = Any
actual inline fun synchronized(lock: LockObject, block: () -> R): R {
return kotlin.synchronized(lock, block)
}
internal actual suspend fun ByteReadChannel.source(): BufferedSource {
return toInputStream().source().buffer()
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy