arrayqueues icon indicating copy to clipboard operation
arrayqueues copied to clipboard

Support parallel put or get & avoid race condition

Open bjudkewitz opened this issue 8 months ago • 0 comments

Great project!

As far as I can tell, ArrayQueue does not use any locks and does not support more than one process each for writing (.put) or reading (.get) from the queue, potentially leading to a race condition. Is there any interest in changing this / making ArrayQueue compatible with parallel reads/writes? If not, the documentation should perhaps be updated, since the wording drop-in replacement might lead readers to expect similar behavior to the multiprocessing Queue, which does handle multiple readers & writers. In some sense a queue that doesn't support more than one consumer and one producer is more like a pipe.

bjudkewitz avatar Jun 17 '24 09:06 bjudkewitz