3 ms·
Concurrency deals with multiple threads/processors running together, but not necessarily executing at once. So it applies everywhere, even on a single core mach
by keeperofdakeys 13y ago
Concurrency deals with multiple threads/processors running together, but not necessarily executing at once. So it applies everywhere, even on a single core machine.
A great example of concurrency is a gui application. Without threads, any blocking operations will make your application unresponsive. You need multiple threads so that if one thread is blocking on a syscall, the other is available to execute gui actions. This works in python, because the GIL only applies to actually executing python threads.
As far as writing general-purpose applications in python goes, most don't hammer all cores with work. In fact, they usually only require I/O concurrency, so python works as well as any other language.