4 ms·
You don’t? concurrent.futures.ThreadPoolExecutor can get a lot done without touching async code.
by kristjansson 2y ago
You don’t? concurrent.futures.ThreadPoolExecutor can get a lot done without touching async code.
- BugsJustFindMe 2y agoI am a big advocate for ThreadPoolExecutor. I'm saying it's superior to asyncio. The person I'm responding to was asking why use threads when you can use asyncio instead.
- kristjansson 2y agoAch, I posted before I saw the rest of your thread, apologies. Totally agree, concurrent.futures strikes a great balance. Enough to get work done, a bit more constrained than threads on their own. Asyncio is a lot of cud to chew if you just want a background task in an otherwise sync application