Message 338808 - Python tracker (original) (raw)

Windows only allows a single thread to access Win32 GUI elements at a time, and I'm fairly sure whichever part of Tcl/Tk/Tkinter is responsible for this makes sure it happens.

So if you're throwing lots of UI updates at the UI thread, then yeah, you're going to cause massive contention there. Not sure there's any way around it other than "don't do that" - while you could lock individual data structures, Windows doesn't permit that because it turns out people get it wrong and make programs that crash.