Parallel Processing
Multi-Processing, Parallel Processing, and Distributed Processing
Last updated
Was this helpful?
Multi-Processing, Parallel Processing, and Distributed Processing
Last updated
Was this helpful?
Concurrency is when two or more tasks can start, run, and complete in overlapping time periods. It doesn't necessarily mean they'll ever both be running at the same instant. For example, multitasking on a single-core machine.
Parallelism is when tasks literally run at the same time, e.g., on a multi-core processor.
I'd perhaps characterise concurrency as a property of a program or system (and parallelism as the run-time behaviour of executing multiple tasks at the same time)
List are not thread save, should not be used in multi-threading
Deque is a little more complex. The documentation clearly states that both the .append() and .pop() operations are atomic, meaning that they wonβt be interrupted by a different thread. Other methods in deque are not thread-safe
LifoQueueis designed to be fully thread-safe. All of its methods are safe to use in a threaded environment. It also adds optional time-outs to its operations which can frequently be a must-have feature in threaded programs
Expand number of workers and contract as per requirements (traffic on the site)
threading: