3 ms·
The code involved in hooking together the IO loop with the thread completion seems pretty complex. I wrote a library a short while ago to deal with the same pro
by zacharyvoase 15y ago
The code involved in hooking together the IO loop with the thread completion seems pretty complex. I wrote a library a short while ago to deal with the same problem in gevent, but I opted to use the self-pipe trick; you can see the implementation here: https://github.com/zacharyvoase/gevent-selfpipe/blob/master/lib/gevent_selfpipe/__init__.py https://github.com/zacharyvoase/gevent-selfpipe/blob/master/...
- rabidsnail 15y agoHow is decorating your function with @in_thread_pool complex? The threads are managed automatically. Unless I'm misunderstanding your question.
- zacharyvoase 15y agoI'm talking about the implementation, sorry :)