I'm new to Channels. I have a Downloader, which ha...
# coroutines
u
I'm new to Channels. I have a Downloader, which has a sequential BlockingQueue of download tasks. I need to enqueue, remove and view pending tasks. This is trivial with BlockingQueue. If I move this to a Channel, the sequential nature of it creates a queue, however how do I remove a enqueued or view all pending tasks? Do I need to keep track of the enqueues myself now?
l
@Vsevolod Tolstopyatov [JB] Is that the kind of capabilities you'd add to "State of the art channels"?
v
Nope, we’re planning to preserve the API in its current form. What will change is significantly reduced DEX size, decreased allocation rate and also complete correctnes and linearizability
🎉 1
u
Soo.. I have keep track of manaully in a Queue, make it thread safe, and possibly reorder it since I dont controll the other of receives? To remove, add some sort of a wasRemoved flag, and check it upon receivng and exit early?