arrayqueues
arrayqueues copied to clipboard
Support parallel put or get & avoid race condition
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.