python - Multiprocessing: main programm stops until process is finished -


i know, minimal working example gold standard , working on it. however, maybe there obvious error. function run_worker executed upon button press event. initiates class instance , should start method of class. function run_worker waits until class method has finished. result kivy gets stuck , cannot other stuff. ideas how should use multiprocessing in case ?

from multiprocessing import process  class settingsapp(app):     """ short not working version of actual programm     """     def build(self):         """some kivy specific settings"""         return interface  """this part not work expected. run pushing button.  however, function hang until process has finished (or has been killed)."""      def run_worker(self):         """the phbot application started second process. otherwise kivy blocked until function stops         (which controlled close button)         """         # arguments in appropriate form         args = self.get_stored_settings()          # initiate class should run separate process         bot = phbot(*args)          # control method runs devices, listens sensors etc.         phbot = process(target=bot.ph_control(), args=(bot,))          # start process         phbot.start()          # statement executed after phbot has stopped.         print('started') 

i suggest study daemon processes here: https://pypi.python.org/pypi/python-daemon/

https://askubuntu.com/questions/192058/what-is-technical-difference-between-daemon-service-and-process


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -