If I use Ctrl-C to exit a program using aiofiles with an open file pipe, another Ctrl-C is required and the thread is hanging in _wait_for_tstate_lock elif lock.acquire(block, timeout). A common solution I've seen is to ensure the thread is marked as a daemon, so that "the entire Python program exits when only daemon threads are left".
If I use Ctrl-C to exit a program using
aiofiles
with an open file pipe, another Ctrl-C is required and the thread is hanging in_wait_for_tstate_lock elif lock.acquire(block, timeout)
. A common solution I've seen is to ensure the thread is marked as a daemon, so that "the entire Python program exits when only daemon threads are left".