faster-fifo icon indicating copy to clipboard operation
faster-fifo copied to clipboard

bug: faster-fifo does *not* mimic the interface of multiprocessing.queue

Open no2chem opened this issue 2 years ago • 4 comments

In the documentation for faster-fifo, it states:

Completely mimics the interface of the standard multiprocessing.Queue,

But it does not, because the standard Queue.put interface specifies timeout=None.

put(obj[, block[, timeout]])
Put obj into the queue. If the optional argument block is True (the default) and timeout is None (the default), block if necessary until a free slot is available. 

Using multiprocessing.Queue.put(item) would never result in Queue.Full being raised. However, since timeout is set to Float(10) in faster-fifo, "dropping in" faster-fifo would result in Queue.Full being raised if the queue is full and the wait times out.

Moreover, I don't think the current code properly handles timeout=None.

no2chem avatar Jul 07 '23 18:07 no2chem

@alex-petrenko Any fixes for this issue?

DariusSG avatar Feb 14 '24 10:02 DariusSG

@no2chem @DariusSG I'm not able to work on this repository atm for personal reasons.

Comments made by @no2chem above are fair and this requires a fix.

alex-petrenko avatar Feb 16 '24 22:02 alex-petrenko