Skip to content

Commit

Permalink
parallel heart also gets its own Context
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed Jan 14, 2012
1 parent 7e81bf6 commit 6c32815
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions IPython/parallel/controller/heartmonitor.py
Expand Up @@ -40,6 +40,10 @@ class Heart(object):
id=None
def __init__(self, in_addr, out_addr, in_type=zmq.SUB, out_type=zmq.DEALER, heart_id=None):
self.device = ThreadDevice(zmq.FORWARDER, in_type, out_type)
# do not allow the device to share global Context.instance,
# which is the default behavior in pyzmq > 2.1.10
self.device.context_factory = zmq.Context

self.device.daemon=True
self.device.connect_in(in_addr)
self.device.connect_out(out_addr)
Expand Down

0 comments on commit 6c32815

Please sign in to comment.