Author terry.reedy
Recipients Ivan.Pozdeev, serhiy.storchaka, terry.reedy
Date 2018-05-06.19:20:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Without thread support, event generation from multiple threads fails immediately.  I tried an experiment with callback scheduling.  It seems to work -- almost. runs on 2.7 with non-t tcl.  It modifies by replacing
  , lambda t.event_generate(c))
to schedule the event generation in the main thread.
It also imports either tkinter or Tkinter, and runs for 10 seconds
for a more rigorous test.

However, when I add 2 0s to the delay, to make it 1000 seconds, the main thread and gui crash sometime sooner (100 seconds, say), leaving the worker threads sending indefinitely.  One time there was a traceback:

Traceback (most recent call last):
  File "F:\dev\tem\", line 55, in <module>
  File "F:\dev\tem\", line 35, in go
AttributeError: 'Main' object has no attribute 't_cleanup'

A second time, nothing appeared.

I suspect that without proper locking an .after call was eventually interrupted and the pending scheduled callback data structure corrupted. Mainloop exits without t_cleanup created.
Date User Action Args
2018-05-06 19:20:11terry.reedysetrecipients: + terry.reedy, serhiy.storchaka, Ivan.Pozdeev
2018-05-06 19:20:11terry.reedysetmessageid: <>
2018-05-06 19:20:11terry.reedylinkissue33412 messages
2018-05-06 19:20:11terry.reedycreate