Contribute Media
A thank you to everyone who has made this possible: Read More

Running Python code in parallel and asynchronously

Description

My outline will be:

  1. What does it mean to run code in parallel in Python? How does it differ from concurrency? Can they be applied at the some time?
  2. GIL and why it complicates parallelism in Python (CPython), but only to some extent.
  3. Difference between a thread and a process from the OS point of view.
  4. When parallelism in Python is useful and when to avoid it.
  5. Description of how to achieve parallel execution in CPython and how to do it properly.
  6. Possible traps when using parallel programming in Python.
  7. What happens if the code runs both in parallel and asynchronously?
  8. Is it really beneficial?
  9. How such execution can be achieved?

As the outline shows I will focus on the parallel part as it is an important topic in our current time of multicore processors and multiprocessor systems.

The topic has been discussed a lot of times but mainly from the scientific point of view, where it's been used for speeding up calulcations time. I will not go into these use cases (e.g. using MPI) but rather discuss it from web development point of view (e.g. multi worker applications).

Details

Improve this page