arrow-fx-coroutines / arrow.fx.coroutines / ConcurrentVar / isNotEmpty
abstract suspend fun isNotEmpty():
Boolean
Returns true if there no elements. Otherwise false. This may be outdated immediately; use tryPut or tryTake to put & take without suspending.
import arrow.fx.coroutines.*
suspend fun main(): Unit {
//sampleStart
val empty = ConcurrentVar.empty<Int>().isNotEmpty()
val full = ConcurrentVar(10).isNotEmpty()
//sampleEnd
println("empty: $empty, full: $full")
}
Do you like Arrow?
✖