[Python-ideas] reducing multiprocessing.Queue contention

Richard Oudkerk shibturn at gmail.com
Wed Jan 23 14:13:30 CET 2013


On 23/01/2013 12:27pm, Charles-François Natali wrote:
> Maybe I wasn't clear.
> I'm not suggesting to not hold the lock when sending less than
> PIPE_BUF, since it wouldn't work in the case you describe above.
> I'm suggesting to serialize the data prior to acquiring the writer
> lock, to reduce contention (and unserialize after releasing the
> reading lock).

That is reasonable.  In fact if we should probably serialize when put() 
is called to catch any pickling error early.

-- 
Richard




More information about the Python-ideas mailing list