Pausing a thread using threading class

后端 未结 6 1455
情歌与酒
情歌与酒 2020-12-08 07:41

I have a long process that i\'ve scheduled to run in a thread, because otherwise it will freeze the ui in my wxpython application.

I\'m using

thread         


        
6条回答
  •  生来不讨喜
    2020-12-08 08:17

    The multiprocessing module works fine on Windows. See the documentation here (end of first paragraph):

    http://docs.python.org/library/multiprocessing.html

    On the wxPython IRC channel, we had a couple fellows trying multiprocessing out and they said it worked. Unfortunately, I have yet to see anyone who has written up a good example of multiprocessing and wxPython.

    If you (or anyone else on here) come up with something, please add it to the wxPython wiki page on threading here: http://wiki.wxpython.org/LongRunningTasks

    You might want to check that page out regardless as it has several interesting examples using threads and queues.

提交回复
热议问题