multithreading - Python -- switched from Threading to Multiprocessing, now publish/subscribe (Louie) doesn't work -


i switched of threading implementations multiprocessing today , went great -- except louie dispatcher messages. granted, that's not latest publish/subscribe module, use because have use python-openzwave. imagine has messages not being able sent across processes. question is, there way louie? if not -- there publish/subscribe message module allows it? thanks.

edit, asked post code:

for example, here process continually runs in background , performs computer/network/security checks:

the call start check class:

_ = utilities.environment() 

the environment class (just init , main function):

class environment(object):      def __init__(self):         self.logger = logging.getlogger(genconfig.logger_name)         self.process = multiprocessing.process(target=self.run_tests)         self.process.daemon = true         self.process.start()      def run_tests(self):         self.zwavereceived = false         while true:             self.comp_test()             self.net_test()             self.server_test()             self.audio_test()             self.security_test()             self.ups_test()             self.zwave_test()              time.sleep(genconfig.sys_checks_interval) 

within self.comp_test, publish @ end (i've printed here , know getting here):

if comptest > 0:     wx.callafter(dispatcher.send, eventconfig.syschk_listener, orders=eventconfig.evt_comp_off) else:     wx.callafter(dispatcher.send, eventconfig.syschk_listener, orders=eventconfig.evt_comp_on) 

and 1 of subscribers:

dispatcher.connect(self.flip_sys_btns, eventconfig.syschk_listener) 

like said, i've print-stepped through , publish made, don't subscriber side. code worked when using threads, nothing has changed except switched multiprocessing.


Popular posts from this blog