All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.com.seiko.imageloader.util.Platform.kt Maven / Gradle / Ivy

There is a newer version: 1.9.0
Show newest version
package com.seiko.imageloader.util

import io.ktor.client.engine.HttpClientEngine
import io.ktor.utils.io.ByteReadChannel
import kotlinx.coroutines.CoroutineDispatcher
import okio.BufferedSource
import okio.FileSystem

expect class WeakReference(referred: T) {
    fun get(): T?
}

expect class AtomicBoolean(referred: Boolean) {
    fun get(): Boolean
    fun compareAndSet(expect: Boolean, update: Boolean): Boolean
}

expect class LockObject()

internal expect inline fun  synchronized(lock: LockObject, block: () -> R): R

internal expect suspend fun ByteReadChannel.source(): BufferedSource

internal expect val ioDispatcher: CoroutineDispatcher

internal expect val httpEngine: HttpClientEngine

internal expect val defaultFileSystem: FileSystem?




© 2015 - 2025 Weber Informatics LLC | Privacy Policy