4 ms·
What? The entire definition of being concurrent is doing work in parallel.
by zbowling 13y ago
What? The entire definition of being concurrent is doing work in parallel.
- jamesmiller5 13y agoI believe that is a common misconception. Concurrency enables parallelism but it isn't a requirement. The golang community has lectured about this at length: http://blog.golang.org/concurrency-is-not-parallelism http://blog.golang.org/concurrency-is-not-parallelism
- waxjar 13y agoIt's not :) Running things concurrently means that you finish two or more tasks in the same time period. Running things in parallel means those things happen at the same time.
- coldtea 13y agoNope. Concurrent can be interleaved (like you get multitasking in a single CPU). Parallel is actually parallel (same time).
- keeperofdakeys 13y agoConcurrency 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.