Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #99356
| From | Marc Aymerich <glicerinu@gmail.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Futex hang when running event loop on a separated thread |
| Date | 2015-11-24 16:29 +0100 |
| Message-ID | <mailman.6.1448379007.20593.python-list@python.org> (permalink) |
Hi,
I have to run the asyncio.loop on a separated thread because the main
thread is running FUSE. Apparently fuse needs to run on the main
thread because it uses signal():
....
File "/usr/local/lib/python3.4/dist-packages/fuse.py", line 390, in __init__
old_handler = signal(SIGINT, SIG_DFL)
ValueError: signal only works in main thread
Anyway, when I exit the program it appears that i run into a deadlock
with the eventloop thread, strace is stuck with:
....
futex(0x7f7ba0000c10, FUTEX_WAIT_PRIVATE, 0, NULL
I've tried to stop the event loop from the main thread but the
situation is exactly the same :(
loop_container = {}
handler = threading.Thread(target=run_loop, args=(loop_container,))
try:
handler.start()
FUSE(fs)
finally:
loop_container['loop'].stop()
# handler.join()
Any idea on how I can shutdown the hole thing? I have to manually kill
the program each time :(
--
Marc
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Futex hang when running event loop on a separated thread Marc Aymerich <glicerinu@gmail.com> - 2015-11-24 16:29 +0100
csiph-web