Open mikeawalker opened 11 months ago
What is strange is that the following variation works fine
from kubemq.events import Sender
import time
import multiprocessing
def some_sub_proc( ):
b = Sender( "localhost:5001")
print("Can has ping", flush=True)
b.ping()
print("I never get here!", flush=True)
time.sleep(10)
def main( ):
print("Starting")
#a = Sender( "localhost:5001")
#a.ping()
p = multiprocessing.Process(target=some_sub_proc)
p.start()
p2 = multiprocessing.Process(target=some_sub_proc)
p2.start()
print("Ok trying stuff", flush=True)
p.join()
p2.join()
if __name__=="__main__":
main()
And results in:
python3 ex.py
Starting
Ok trying stuff
Can has ping
Can has ping
I never get here!
I never get here!
Hi, I cannot reproduced what you are experiencing: When i run the code you have provided, i get: Starting Ok trying stuff Can has ping I never get here!
Interesting.
Let me dig into this a little more.
Having an issue with running multiple kubemq sender objects across disparate processes in python.
I am running the latest kubemq community docker container with hash
520bdca15eef
with port 50000 forwarded to 5001I worked up a minimal example to repro:
This results in the following exception: