On Thu, May 31, 2012 at 2:42 PM, Matteo Landi <mat...@matteolandi.net> wrote:
> On Thu, May 31, 2012 at 12:56 PM, Wayne Werner <wa...@waynewerner.com> wrote:
>>
>>
>> On Thu, 31 May 2012, Matteo Landi wrote:
>>
>>> Do you see anything wrong with the description presented above?  Please
>>> say so,
>>> because I can't figure it out!
>>
>>
>> Yes, though I have not looked at your code, if you're doing what you said
>> and
>> using threads in a Tkinter app. This will almost always lead to horrible,
>> nasty
>> bugs. Instead, use the .after() method in Tkinter, and let your app worry
>> about
>> timing/threading.
>
> Hi Wayne,
> I'm currently using `after_idle` to schedule gui updates:  is there
> anything wrong in using it instead of `after`?
>
>
> Cheers,
> Matteo
>
>
> --
> http://www.matteolandi.net/

I found the solution to the problem.  Previously, I was invoking
`Tk.after_idle` outside the mainloop thread, thinking it was
thread-safe to do so;  unfortunately I was wrong, and after
implementing a solution based on a polling gui task and a synchronized
queue shared with the working thread, everything started to work
flawlessly.


Cheers,
Matteo

-- 
http://www.matteolandi.net/
_______________________________________________
Tkinter-discuss mailing list
Tkinter-discuss@python.org
http://mail.python.org/mailman/listinfo/tkinter-discuss

Reply via email to