Skip to content
0:00 / 0:00

#gil#asyncio#multiprocessing

Raymond Hettinger, Keynote on Concurrency, PyBay 2017

SF Python

19K subscribers • 5 videos on Hallway

YouTube
  • Recommended by 5 people: 4 on Hacker News and 1 on Lobsters.
  • A classic. People kept recommending it from 2017 to 2023.
  • Presented by Raymond Hettinger, Python Core Developer
  • Linked in the descriptionSlides on pybay.com

Intermediate. Assumes working knowledge.

160K views9 years ago5 recommendations

Programming languagesSystems programmingPythonConcurrency and parallelismPerformance and optimization

Raymond Hettinger explains Python concurrency models, covering threads, processes, asyncio, locks, and the global interpreter lock with live examples.

Keynote for pybay.com, 2nd annual Regional Python Conference in SF. Slides: pybay.com/site_media/slides/raymond2017-keynote/index.html

Why it's here

5 people recommend this

What people say. Recommended as an exceptionally clear and practical guide to understanding how and when to use different concurrency models in Python.

scrollawayon Hacker News • Recommends

On “Ask HN: What talks or videos do you suggest to watch on a long flight?”

I've started watching Raymond Hettinger's talks lately. He's a core dev on Python. I love them, the guy is charismatic, very smart and his Python knowledge constantly impresses me. link My favourite: link to this video

culebron21on Hacker News • Recommends

On “How to use a Python multiprocessing module”

I've just left the question open, but the best learning material for me on this was this lecture. Other points down the list, I had to figure out just by trial and error. Raymond Hettinger, Keynote on Concurrency, PyBay 2017 link to this video

jcdon Lobsters • Recommends

Raymond Hettinger, Keynote on Concurrency, PyBay 2017

xkgton Hacker News • Recommends

On “Has the Python GIL Been Slain? Subinterpreters in Python 3.8”

It is because only one thread at a time holds the lock in order to avoid race conditions. The keynote1 by Raymond Hettinger from PyBay '17 will be a great place to start if you are new to this. 1 link to this video

fastballon Hacker News • Recommends

On “The GIL and its effects on Python multithreading”

For anyone looking for something on the same topic but a little bit lighter / more practical, I really enjoyed this talk1 by Raymond Hettinger at PyBay 2017, where he discussed the GIL as well. 1 link to this video

devxpyon Hacker News • Mentions

On “Why Threads Are a Bad Idea (1995) [pdf]”

Threads are not hard. In fact, threads are extremely easy to implement. However, real Threading code is just incredibly difficult to reason, just by looking at it. This makes it easy for you to introduce race conditions without even knowing that there is one! There is also the fact that locks don't lock anything! They are just a flag, that a any code may choose to ignore. They are a not an enforcing tool, just a cooperative one. (More here: link to this video ) P.S. I created a library, that makes it easier to write safer multiprocessing code link

dangomon Hacker News • Mentions

On “JupyterCon: I don't like Notebooks [slides]”

Notebooks may be suitable for scratching things, but not much else. The problems noted by the OP are very serious, specially in the scientific world, where many do not have proper software engineering skills. The real issue is that newcomers do not know better, and so they don't realize the damage they're inflicting upon themselves and others before it's too late (irreproducible code, hidden states, dep. management, etc). Even the fast.ai library, which is a wonder, has broken notebooks. For those who try to follow the course at home, trying to run the notebooks is frustrating, as things are out of order and so errors pop up all the time. Jeremy is a wonderful teacher, but compare following…

targafarianon Hacker News • Mentions

On “Python Concurrency: The Tricky Bits”

To say concurrency is broken in Python because of the GIL seems to be reiterated adage without actual wisdom behind it.1 Are you writing an IO-bound task? Then asyncio2 (even if just viewed as an interface: e.g., you can make it even more performant by using uvloop3) is a great way to achieve performant concurrency. As Raymond Hettinger likes to point out, even if you throw away the GIL, you will have to implement locks on shared resources (unless you're writing embarrassingly parallel codes--in which case either you can invoke them separately or use the multiprocessing module to great effect, or see how I do it easily below), and by the time you get all the locks implemented in your G…