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

Sdílet
Vložit
  • čas přidán 19. 05. 2017
  • "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"

Komentáře • 13

  • @MrBulbusOculi
    @MrBulbusOculi Před 7 lety +35

    2:30

  • @arjunkirpal9776
    @arjunkirpal9776 Před 6 lety +2

    awesome! thanks for the talk!

  • @ThrashAbaddon
    @ThrashAbaddon Před 6 lety +1

    Superb talk. Thank you Jesse :)

  • @pydevteam9745
    @pydevteam9745 Před 6 lety +1

    Amazing! Thank you!

  • @chiragshahckshhh9696
    @chiragshahckshhh9696 Před 6 lety +1

    Amazing talk.

  • @XieQiu
    @XieQiu Před 5 lety +1

    really great talk

  • @cinedoodles905
    @cinedoodles905 Před 2 lety

    Great talk. Thank you

  • @mdesm2005
    @mdesm2005 Před 7 lety +3

    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 Před 7 lety

      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 Před 7 lety

      thank you :)

  • @redberries8039
    @redberries8039 Před 5 lety +3

    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