Antoine Pitrou <pit...@free.fr> added the comment:

> > Hmm, it seems to me that it should be done in _poll() instead. 
> > Otherwise, recv() will not be interruptible, will it?
> 
> Or maybe WaitForMultipleObjects() should be changed to also wait on
> sigint_event if called by the main thread.

Indeed, this may be even better.

> If it is an auto-reset event then we must worry about a non-main
> thread stealing the event.  Maybe _PyOS_SigintEvent() should return
> NULL if called by a non-main thread, and be documented with a loud
> usage warning.

You are right, we need a manual reset *or* we must ensure that every
user of _PyOS_SigintEvent only does so from the main thread.

----------

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

Reply via email to