I'm writing a short application in python using tkinter. Everything works except for an unexpected pause - it should be generating an event twice a second, but frequently it will pause for 5 or 6 seconds between signals. I've put print statements to find where the delay is, and found it is the following statement:

self.frame.after(ms, self.tick_handler)

ms is 500 so this should send the event at around .5 seconds. Usually it does, but frequently it hangs for as much as 5 or 6 seconds before tick_handler() gets the signal. The program is pretty simple, with a single worker thread receiving all input from a single queue, events coming from a single tkinter frame. The after() statement is in the worker thread. I've tried shutting off gc (gc.disable()) but that makes no difference. There is minimal activity outside this on my computer.
If I send other input during the pause using mouse or keys it is handled immediately, so the worker thread is not blocked. It looks as if the signal request is received but not fired for some time. I know I can't expect real time performance so .6 seconds wouldn't be noteworthy, but 6.0 seconds?
This is the first time I've worked with tkinter. Is there something I am missing about event handling?
I Think You Did Not Include tkinter.mainloop() At The End
PS: I'm Not Sure...
delay in setting 'after' function in python tkinter