Issue 995925: method after() and afer_idle() are not thread save (original) (raw)

Issue995925

Created on 2004-07-22 13:48 by thaar, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (2)
msg21752 - (view) Author: Tobias Haar (thaar) Date: 2004-07-22 13:48
The methods afer() and after_idle() register the callback function in the list self._tclCommands. This List is member of the Misc class in the file tkinter.py and is not protected by a lock. So it could be that the thread access the list by calling the function after() and to the same time the tkinter mainloop access the list by the methode deletecommand() in the callback function. The same problem will occur if the function after() is called by two theads. solution: Create a lock object and save the list self._tclCommands in the methods : misc.destroy() misc.deletecommand() misc._register()
msg78637 - (view) Author: Guilherme Polo (gpolo) * (Python committer) Date: 2008-12-31 17:24
This is not going to happen. You should be protecting it yourself since this is a special case.
History
Date User Action Args
2022-04-11 14:56:05 admin set github: 40620
2008-12-31 17:24:33 gpolo set status: open -> closednosy: + gpoloresolution: wont fixmessages: +
2004-07-22 13:48:54 thaar create