[Python-ideas] channel (synchronous queue)

Sturla Molden sturla at molden.no
Sun Feb 19 01:59:20 CET 2012


Den 19.02.2012 01:39, skrev Matt Joiner:
>
> Yes, channels can allow for this, but as with locks directionality and 
> ordering matter. Typically messages will only run in a particular 
> direction.
>

Actually, it was only a synchronous MPI_Recv that did this in MPI, a 
synchronous
MPI_Send would have been even worse. Which is why MPI got the
asynchronous method MPI_Irecv...

Sounds like you just want a barrier or a condition primitive. E.g. have 
the sender
call .wait() on a condition and let the receiver call .notify() the 
condition.


Sturla





More information about the Python-ideas mailing list