44 ms·
From the documentation, it doesn't seem clear that there's any guarantee that a particular queued item will ever eventually be dequeued (in a program that runs
by drfuchs 10y ago
From the documentation, it doesn't seem clear that there's any guarantee that a particular queued item will ever eventually be dequeued (in a program that runs forever).
Consider the case where each producer thread queues N items, and then waits until at least one of its N items is dequeued before immediately topping back up; while the consuming thread dequeues at a slower rate than the producers are able to produce. Maybe no item from producer number 1 ever gets dequeued? Or did I miss something in the documentation?
- deleted 10y ago[deleted]
- kasey_junk 10y agoThe documentation says it's not serializable or linearizable in some cases, nor does it have preemption or fairness garauntees so you are correct.