cpython/Lib/test/test_asyncio
Victor Stinner 2fa2c3dfc5 (Merge 3.4) Python issue #21645, Tulip issue 192: Rewrite signal handling
Since Python 3.3, the C signal handler writes the signal number into the wakeup
file descriptor and then schedules the Python call using Py_AddPendingCall().

asyncio uses the wakeup file descriptor to wake up the event loop, and relies
on Py_AddPendingCall() to schedule the final callback with call_soon().

If the C signal handler is called in a thread different than the thread of the
event loop, the loop is awaken but Py_AddPendingCall() was not called yet. In
this case, the event loop has nothing to do and go to sleep again.
Py_AddPendingCall() is called while the event loop is sleeping again and so the
final callback is not scheduled immediatly.

This patch changes how asyncio handles signals. Instead of relying on
Py_AddPendingCall() and the wakeup file descriptor, asyncio now only relies on
the wakeup file descriptor. asyncio reads signal numbers from the wakeup file
descriptor to call its signal handler.
2014-07-17 22:45:42 +02:00
..
__init__.py
__main__.py
echo.py
echo2.py
echo3.py
keycert3.pem
pycacert.pem
ssl_cert.pem
ssl_key.pem
test_base_events.py asyncio: sync with Tulip 2014-07-14 18:33:40 +02:00
test_events.py asyncio tests: make quiet the logs of SSL handshake failures when running tests 2014-07-14 22:26:34 +02:00
test_futures.py asyncio: sync with Tulip 2014-07-10 22:32:58 +02:00
test_locks.py Issue #21163, asyncio: Fix some "Task was destroyed but it is pending!" logs in tests 2014-06-25 23:11:21 +02:00
test_proactor_events.py Python issue #21645, Tulip issue 192: Rewrite signal handling 2014-07-17 22:43:40 +02:00
test_queues.py Issue #21163, asyncio: Fix some "Task was destroyed but it is pending!" logs in tests 2014-06-25 23:11:21 +02:00
test_selector_events.py asyncio: test_selector_events: remove duplicate call to _on_handshake() method 2014-07-16 18:02:10 +02:00
test_streams.py Issue #21645, #21985: Remove debug code 2014-07-16 10:24:27 +02:00
test_subprocess.py asyncio: Fix test_stdin_broken_pipe(), drain() can also raise 2014-07-17 14:01:14 +02:00
test_tasks.py asyncio: test_as_completed(): disable "slow callback" warning 2014-07-16 18:54:13 +02:00
test_transports.py
test_unix_events.py Python issue #21645, Tulip issue 192: Rewrite signal handling 2014-07-17 22:43:40 +02:00
test_windows_events.py asyncio: Fix pyflakes errors 2014-06-18 03:25:23 +02:00
test_windows_utils.py Fix asyncio tests on Windows: wait for the subprocess exit 2014-06-04 00:42:04 +02:00