appleMain.Channel.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of kable-core Show documentation
Show all versions of kable-core Show documentation
Kotlin Asynchronous Bluetooth Low Energy
package com.juul.kable
import kotlinx.coroutines.channels.SendChannel
import kotlinx.coroutines.runBlocking
internal fun SendChannel.sendBlocking(element: E) {
if (trySend(element).isSuccess) return
runBlocking { send(element) }
}