Tinche / aiofiles

File support for asyncio
Apache License 2.0
2.66k stars 150 forks source link

Thread Hanging in _wait_for_tstate_lock elif lock.acquire(block, timeout): #93

Open jdtsmith opened 3 years ago

jdtsmith commented 3 years ago

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".