hello
I have:
def thread1():
s = context.socket(zmq.PAIR)
s.bind('inproc://name')
s.send_pyobj( dictionary )
### That's all I need to do , can I close s here?
while True:
# stay alive forever
def thread2():
s = context.socket(zmq.PAIR)
s.connect('inproc://name')
dx = s.recv_pyobj()
while True:
# stay alive forever
def main():
Thread(....thread1..).start()
time.sleep(5) #5secs
Thread(....thread2..).start()
#wait for signals
thread1 is the parent one, proceeds independently.
thread2 can only proceed once it got the dictionary from thread1
1. do I need the sleep(5) in the main thread to ensure thread1 bind happens
before thread2 connect?
2. can I close s in thread1 as soon as I send the dictionary?
Thanks,
_______________________________________________
zeromq-dev mailing list
[email protected]
http://lists.zeromq.org/mailman/listinfo/zeromq-dev