any simple thread-based concurrency "framework" fo...
# announcements
f
any simple thread-based concurrency "framework" for a producer(s) -> queue(s) -> consumer(s) pattern?
c
f
I didn't find anything about queue support. I found that the hard part is to properly terminate the different tasks (beeing threads or whatever) on either success or exception.
maybe the buffering method can do it. worth a test at least, thanks for sharing
c
Channels (which Flows use under-the-hood) are all buffered, and tasks can be queued/scheduled from the producer side. Or you could try using Channels directly. Generally, Kotlin discourages the use of raw Threads in favor of coroutines (which can be set up to run on different threads/thread pools)