|
|
|
@ -183,8 +183,8 @@ class Channel(object):
|
|
|
|
|
|
|
|
|
|
def __iter__(self):
|
|
|
|
|
'''
|
|
|
|
|
Return an iterator that yields objects arriving on this channel, until the
|
|
|
|
|
channel dies or is closed.
|
|
|
|
|
Return an iterator that yields objects arriving on this channel, until
|
|
|
|
|
the channel dies or is closed.
|
|
|
|
|
'''
|
|
|
|
|
while True:
|
|
|
|
|
try:
|
|
|
|
@ -198,7 +198,8 @@ class Channel(object):
|
|
|
|
|
|
|
|
|
|
class SlaveModuleImporter(object):
|
|
|
|
|
'''
|
|
|
|
|
Import protocol implementation that fetches modules from the parent process.
|
|
|
|
|
Import protocol implementation that fetches modules from the parent
|
|
|
|
|
process.
|
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
def __init__(self, context):
|
|
|
|
@ -358,8 +359,8 @@ class Stream(object):
|
|
|
|
|
|
|
|
|
|
def Receive(self):
|
|
|
|
|
'''
|
|
|
|
|
Handle the next complete message on the stream. Raise CorruptMessageError
|
|
|
|
|
or IOError on failure.
|
|
|
|
|
Handle the next complete message on the stream. Raise
|
|
|
|
|
CorruptMessageError or IOError on failure.
|
|
|
|
|
'''
|
|
|
|
|
Log('%r.Receive()', self)
|
|
|
|
|
|
|
|
|
@ -602,9 +603,9 @@ class Context(object):
|
|
|
|
|
|
|
|
|
|
def EnqueueAwaitReply(self, handle, deadline, data):
|
|
|
|
|
'''
|
|
|
|
|
Send a message to the given handle and wait for a response with an optional
|
|
|
|
|
timeout. The message contains (reply_handle, data), where reply_handle is
|
|
|
|
|
the handle on which this function expects its reply.
|
|
|
|
|
Send a message to the given handle and wait for a response with an
|
|
|
|
|
optional timeout. The message contains (reply_handle, data), where
|
|
|
|
|
reply_handle is the handle on which this function expects its reply.
|
|
|
|
|
'''
|
|
|
|
|
Log('%r.EnqueueAwaitReply(%r, %r, %r)', self, handle, deadline, data)
|
|
|
|
|
reply_handle = self._stream.AllocHandle()
|
|
|
|
|