|
|
|
|
|
by 3amOpsGuy
4729 days ago
|
|
How can the GIL, which is restricted to one process, hinder concurrency? It can only impact 1 single form of concurrency, threading. Why use threads? Noone does parallel compute on CPUs these days, not since GPGPUs rocked up almost 5 years ago (and we often use python as the host language, thanks pyCuda!) Parallel IO then? Well, except that async IO is often far more resource efficient (at the cost of complexity though). Threading is dead(-ish) because its hard to write, hard to test and expensive to get right. Concurrency in python is very much alive though. |
|
I want to live in your world where all you are processing is vectors and FFTs in parallel on GPUs and not doing real work (accessing databases, processing data from sockets, etc).
Threading is not dead. It's only crippled in python so everyone wants to invent ways of saying it is dead.
Threading being hard to write is also a fallacy. I use thread backed dispatch queues which make concurrency simple in my language of choice right now. Threading like that is easy thanks to closures and a good design patterns. My apps are entirely async and run heavily parallel and it's easy to maintain and write using that.