|
|
|
@ -769,9 +769,10 @@ class Context(object):
|
|
|
|
def send_await(self, msg, deadline=None):
|
|
|
|
def send_await(self, msg, deadline=None):
|
|
|
|
"""Send `msg` and wait for a response with an optional timeout."""
|
|
|
|
"""Send `msg` and wait for a response with an optional timeout."""
|
|
|
|
receiver = self.send_async(msg)
|
|
|
|
receiver = self.send_async(msg)
|
|
|
|
response = receiver.get_data(deadline)
|
|
|
|
response = receiver.get(deadline)
|
|
|
|
IOLOG.debug('%r._send_await() -> %r', self, response)
|
|
|
|
data = response.unpickle()
|
|
|
|
return response
|
|
|
|
IOLOG.debug('%r._send_await() -> %r', self, data)
|
|
|
|
|
|
|
|
return data
|
|
|
|
|
|
|
|
|
|
|
|
def __repr__(self):
|
|
|
|
def __repr__(self):
|
|
|
|
return 'Context(%s, %r)' % (self.context_id, self.name)
|
|
|
|
return 'Context(%s, %r)' % (self.context_id, self.name)
|
|
|
|
|