[Python-ideas] channel (synchronous queue)
sturla at molden.no
Sun Feb 19 19:29:00 CET 2012
Den 19.02.2012 19:07, skrev shibturn:
> One problem with multiprocessing's Event uses 5 semaphores.
> (Condition uses 4 and Lock, RLock, Semaphore use 1). So your Barrier
> will use 5*numproc semaphores.
It is of course trivial to implement a dissemination barrier in C,
atomic read/write (and shared memory for multiprocessing). It would take
O(n log2 n) amount of shared memory. One iteration of .wait() would take
O(log2 n) time.
More information about the Python-ideas