diff options
-rw-r--r-- | chroma/generator/photon.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chroma/generator/photon.py b/chroma/generator/photon.py index 5ae1e93..39e8cf4 100644 --- a/chroma/generator/photon.py +++ b/chroma/generator/photon.py @@ -18,7 +18,7 @@ class G4GeneratorProcess(multiprocessing.Process): def run(self): gen = g4gen.G4Generator(self.material, seed=self.seed) - context = zmq.Context.instance() + context = zmq.Context() vertex_socket = context.socket(zmq.PULL) vertex_socket.connect(self.vertex_socket_address) photon_socket = context.socket(zmq.PUSH) @@ -75,7 +75,7 @@ class G4ParallelGenerator(object): for p in self.processes: p.start() - self.zmq_context = zmq.Context.instance() + self.zmq_context = zmq.Context() self.vertex_socket = self.zmq_context.socket(zmq.PUSH) self.vertex_socket.bind(self.vertex_address) self.photon_socket = self.zmq_context.socket(zmq.PULL) |