[issue19293] test_asyncio hanging for 1 hour

Charles-François Natali report at bugs.python.org
Sat Oct 19 21:53:57 CEST 2013


Charles-François Natali added the comment:

Here's a patch changing asyncio to not rely on a Python-level signal handler at all: it reads the signal number from the self-pipe.
It should therefore work even if the select()/poll()/etc syscall doesn't fail with EINTR, and incidentally require only one wakup per signal.
Also, it gets rid of BaseEventLoop._add_callback_signalsafe().

I just had to update a test which was timing-dependent (basically, before when a signal was received you had to add the handler to the ready list and issue a self-write to wakeup the main loop, now the handler is added to the ready list and the loop is automatically woken up).

This should fix the PPC Linux and FreeBSD failures.

I'm not so sure about AIX, since the error looks different.

----------
Added file: http://bugs.python.org/file32232/asyncio_signal.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19293>
_______________________________________


More information about the Python-bugs-list mailing list