A Jesse Jiryu Davis Grok the GIL Write Fast And Thread Safe Python PyCon 2017

  Рет қаралды 8,546

PyCon 2017

PyCon 2017

7 жыл бұрын

"Speaker: A. Jesse Jiryu Davis
I wrote Python for years while holding mistaken notions about the Global Interpreter Lock, and I've met others in the same boat. The GIL's effect is simply this: only one thread can execute Python code at a time, while N other threads sleep or await network I/O. Let's read CPython interpreter source and try some examples to grok the GIL, and learn to write fast and thread-safe Python.
Slides can be found at: speakerdeck.com/pycon2017 and github.com/PyCon/2017-slides"

Пікірлер: 13
@MrBulbusOculi
@MrBulbusOculi 7 жыл бұрын
2:30
@melizeche
@melizeche 7 жыл бұрын
thanks!
@RoamingAdhocrat
@RoamingAdhocrat 3 жыл бұрын
Seriously why are so many uploads like this
@arjunkirpal9776
@arjunkirpal9776 6 жыл бұрын
awesome! thanks for the talk!
@ThrashAbaddon
@ThrashAbaddon 6 жыл бұрын
Superb talk. Thank you Jesse :)
@pydevteam9745
@pydevteam9745 6 жыл бұрын
Amazing! Thank you!
@chiragshahckshhh9696
@chiragshahckshhh9696 6 жыл бұрын
Amazing talk.
@XieQiu
@XieQiu 5 жыл бұрын
really great talk
@cinedoodles905
@cinedoodles905 2 жыл бұрын
Great talk. Thank you
@mdesm2005
@mdesm2005 7 жыл бұрын
Nice. And I like "dumb" examples, they let you focus on the principle that's being communicated. Question, how does the OS (linux, Windows) determine what core to run the forked process in ? Is the forked process guaranteed to run in a different core (assuming a muli core CPU)?
@Cat_Stevens
@Cat_Stevens 7 жыл бұрын
It differs a lot between operating systems, because of course task scheduling is the job of the kernel. For Linux, take a look at stackoverflow.com/q/23259881/4532996. On Windows, it's much harder to know, because of course it's closed source, but the most cache friendly decision is usually chosen in both cases. However, on Windows, Darwin (Mac OS X's BSD-like kernel), and Linux, the chance to be moved to a new CPU core is affected by the parent process's "nice" status (see en.wikipedia.org/wiki/Nice_(Unix) and en.wikipedia.org/wiki/Processor_affinity )
@mdesm2005
@mdesm2005 7 жыл бұрын
thank you :)
@redberries8039
@redberries8039 5 жыл бұрын
It doesn't matter if you're the original or the clone ...what matters is who grabs the bank account first, the wife can wait ..she will follow the money
Larry Hastings   The Gilectomy How's It Going   PyCon 2017
45:51
PyCon 2017
Рет қаралды 22 М.
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 10 МЛН
УГАДАЙ ГДЕ ПРАВИЛЬНЫЙ ЦВЕТ?😱
00:14
МЯТНАЯ ФАНТА
Рет қаралды 4,3 МЛН
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 7 МЛН
Eric Evenchick   Hacking Cars with Python   PyCon 2017
29:48
PyCon 2017
Рет қаралды 15 М.
Benny Bauer   Python in The Serverless Era   PyCon 2017
30:47
PyCon 2017
Рет қаралды 9 М.
Async Generators in Python: A Deep Dive - Łukasz Langa - code::dive 2023
43:20
code::dive conference
Рет қаралды 1,6 М.
WHY IS THE STACK SO FAST?
13:46
Core Dumped
Рет қаралды 143 М.
Sam Agnew   Hacking Classic Nintendo Games with Python   PyCon 2017
28:33
Why Isn't Functional Programming the Norm? - Richard Feldman
46:09
Alex Orlov   Cython as a Game Changer for Efficiency   PyCon 2017
27:29
Опасность фирменной зарядки Apple
00:57
SuperCrastan
Рет қаралды 10 МЛН