3 ms·
so how does this compare to something like Deco? https://github.com/alex-sherman/deco https://github.com/alex-sherman/deco. I guess since this uses a single GIL
by solotronics 9y ago
so how does this compare to something like Deco? https://github.com/alex-sherman/deco https://github.com/alex-sherman/deco. I guess since this uses a single GIL its good for IO limited things?
- icegreentea2 9y agoAs written, the code in the blogpost is good for IO limited things. But as it notes, if you replace 'ThreadPoolExecutor' with 'ProcessPoolExecutor' then you get actual multiprocessing, and you may be able to get speedup on compute bound tasks. The linked repo looks like some nice wrappers/decorators around the 'old' multiprocessing library to make it really easy to parallelize a bunch of function calls within a blocking function.