Skip to content

Commit

Permalink
don't use zero-copy message tracker for blocking behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Sep 30, 2013
1 parent 7026b9d commit 63efdd5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions py/zero/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,9 +437,10 @@ def send(self, obj):
self.setup.debug('Sending %s to %s', msg, self.setup.point)
sleep(self.naptime) # TODO: Find out how to tell when it is connected
self.naptime = 0
tracker = self.sock.send(msg, copy=False, track=True)
if self.setup.block:
tracker.wait()
flags = 0
if not self.setup.block:
flags |= zmq.NOBLOCK
self.sock.send(msg, flags)

@property
def active(self):
Expand Down

0 comments on commit 63efdd5

Please sign in to comment.