3 ms·
Well this isn't the full story. If you have an I/O bound work-load, say you want to parallelize HTTP requests, threads work just fine.
by js2 9y ago
Well this isn't the full story. If you have an I/O bound work-load, say you want to parallelize HTTP requests, threads work just fine.
- alanfranzoni 9y agoIf you have an I/O bound workload, a reactor or proactor approach are way better. No dealing with locks, race conditions, etc. I never said it's wrong, it's just pointless. In Python, there's always a better alternative to multithreading which has no shortcomings.
- Erwin 9y agoThat's assuming all the IO you can block on HAS support for non-threaded concurrency. Things that wrap C libraries may support threads, but not the reactor-of-the-day (twisted? tornado? etc.)