not completely thread-safe?
pebbe opened this issue · comments
I run into a problem that is hard to diagnose.
I have got a main go routine that initializes much of tk, registers call back functions and binds them to events. Then a second go routine is started that continues to update tk.
It looks like the call back functions (that also update tk) and the tk update commands from the second go routine get mixed up. And command getting inserted in the middle of the other command.
The problem seems to disappear when I do all tk update commands from the main go routine.
Any idea what could be going on? Could this be a problem in gothic? Or should I just not interact with tk from a separate go routine?
Correction. This also happens when I don't use a second go routine.
Never mind. The problem was not in gothic, but in my own code. I was using a global tcl variable where I should be using a namespaced variable.
Please excuse me for this disturbance.
:)