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

Class Channel


A communications channel.

Method Summary
  __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.
  __del__(self)
  close(self)
Explicitly close the channel.
  receive(self)
Receive an object through the channel, returning the object.
  send(self, obj)
Send the given object 'obj' through the channel.
  wait(self, options)
Wait for the created process, if any, to exit.

Method Details

__init__(self, pid, read_pipe, write_pipe)
(Constructor)

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.

close(self)

Explicitly close the channel.

receive(self)

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.)

send(self, obj)

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.)

wait(self, options=0)

Wait for the created process, if any, to exit.

Generated by Epydoc 2.1 on Thu Mar 29 01:54:07 2007 http://epydoc.sf.net