when i was using threads used to work on concurren...
# coroutines
c
when i was using threads used to work on concurrentlinkedqueue and others is there any equivalent for it in kotlin when using coroutines?
k
I think that would be a
Channel
val unlimitedChannel = Channel<String>(UNLIMITED)
z
You can still use Java's lock-free concurrent data structures with coroutines, the same principles apply, and there are no kotlin-specific implementations of those in the standard library at this time.
Channel
is effectively a blocking queue, and can be used instead of
BlockingQueue
and friends.