Module pprocess :: Class Channel
[hide private]
[frames] | no frames]

Class Channel

source code

Known Subclasses:

A communications channel.

Instance Methods [hide private]
 
__init__(self, pid, read_pipe, write_pipe)
Initialise the channel with a process identifier 'pid', a 'read_pipe' from which messages will be received, and a 'write_pipe' into which messages will be sent.
source code
 
__del__(self) source code
 
close(self)
Explicitly close the channel.
source code
 
wait(self, options=0)
Wait for the created process, if any, to exit.
source code
 
_send(self, obj)
Send the given object 'obj' through the channel.
source code
 
send(self, obj)
Send the given object 'obj' through the channel.
source code
 
_receive(self)
Receive an object through the channel, returning the object.
source code
 
receive(self)
Receive an object through the channel, returning the object.
source code
Method Details [hide private]

send(self, obj)

source code 

Send the given object 'obj' through the channel. Then wait for an
acknowledgement. (The acknowledgement makes the caller wait, thus
preventing processes from exiting and disrupting the communications
channel and losing data.)

receive(self)

source code 

Receive an object through the channel, returning the object. Send an
acknowledgement of receipt. (The acknowledgement makes the sender wait,
thus preventing processes from exiting and disrupting the communications
channel and losing data.)