>>> So I guess it is the wx.lib.plot.PlotCanvas.Draw() command that changes
>>> the behavior of the GUI.
>> Could be -- unfortunately, as I learned from David Beazley's talk that
>> Robin pointed us to -- threading in Python is tricky and unreliable,
>> particularly with multiple processors/cores.
I do not like threads at all! (Not only in Python)
I would rather like to use the multi-processing in 2.6. But...
>> If all that fails, then you may need to give up on on threading --
>> either doing averyint the old-fashioned way, or using multi-processing
>> instead -- the new-in-2.6 multiprocessing module may be helpful for that.
> We have 2.5 for now.
> There is no chance to update for the next few weeks
> because of an other important project. Maybe later.
I gave up threading.
I put the callable of the "worker" methods in a list (besides other
information).
Then in a method called from EVT_IDLE a method is started to call all
"worker" methods in the list once.
No the problem arises that EVT_IDLE is only fired if there is something on
in the GUI like mouse movement.
I added a method called from EVT_IDLE that wx.CallLater(500, method)
calling wx.Frame.UpdateWindowUI() to have at least a EVT_EVENT every
500[ms].
500[ms] is tunable.
This construct runs now very well.
All mentioned problems are gone.
The caveat is, that the "worker" methods do not update regularly
because they are related to EVT_IDLE.
Thanks to everybody who helped.
Regards
--
Kurt Mueller
Something else you could consider is to call wx.WakeUpIdle() after you
have gone through the list of workers. If there are pending events then
they should be processed first, otherwise the event queue will "become
empty" again and that will trigger the sending of another idle event.