[Python-ideas] channel (synchronous queue)
Sturla Molden
sturla at molden.no
Mon Feb 20 01:40:28 CET 2012
Den 20.02.2012 00:38, skrev Massimo Di Pierro:
> It would be very useful to have something like these channels
> built-in. Notice that using OS pipes have the problem of a OS
> dependent size. send is non-blocking for small data-size but becomes
> blocking for large data sizes. Using OS mkfifo or multiprocessing
> Queue is better but the OS limits the number of files open by one
> program.
Most MPI implementations use shared memory on localhost. In theory one
could implement a queue (deque and lock) using a shared memory region (a
file on /tmp or Windows equivalent). It would be extremely fast and
could contain any number of "pipes" of arbitrary size.
Sturla
More information about the Python-ideas
mailing list