Ivan Pozdeev <ivan_pozd...@mail.ru> added the comment:

> Another possibility is for stop() to change conditions so that 
> 'self.target.event_generate(c)' fails with an exception

Could you elaborate? Since there're no docs on event_generate(), I can't look 
up how to make it "fail with an exception" without actually posting an event.


> The only problem is that the first t.join() hangs because of a thread 
> deadlock bug.  t.join() blocks until t.run exits.  t.run does not exit until 
> the last event_generate, with running=False, returns.  But that blocks until 
> dummy_handler runs.
> I suppose there is a teeny possibility that 'running' could be flipped 
> between the test and the call.  Can that be prevented with a lock?

The idea is to let the worker threads finish their work, not terminate them 
forcibly.
So the real problem is that stop() blocks the event loop.
It should rather run asynchronously, wait for threads, then trigger 
`self.root.destroy()` in the main thread... somehow.

----------
resolution: wont fix -> not a bug

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33412>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to