John Reese - Thinking Outside the GIL with AsyncIO and Multiprocessing - PyCon 2018

Поделиться
HTML-код
  • Опубликовано: 16 июл 2024
  • Speaker: John Reese
    Have you ever written a small, elegant application that couldn't keep up with the growth of your data or user demand? Did your beautiful design end up buried in threads and locks? Did Python's very special Global Interpreter Lock make all of this an exercise in futility?
    This talk is for you! With the combined powers of AsyncIO and multiprocessing, we'll redesign an old multithreaded application limited by the GIL into a modern solution that scales with the demand using only the standard library. No prior AsyncIO or multiprocessing experience required.
    Slides can be found at: speakerdeck.com/pycon2018 and github.com/PyCon/2018-slides

Комментарии • 26

  • @Sousleek
    @Sousleek 6 лет назад +14

    This video became a gold mine for me

  • @kosmonautofficial296
    @kosmonautofficial296 Год назад

    awesome video! I am looking forward to trying this out with AsyncSSH

  • @haritmohansaxena732
    @haritmohansaxena732 4 года назад +8

    at @5:55 , you know he is a great programmer when he says, his coworker 'JSON'.

  • @brambeer5591
    @brambeer5591 4 года назад

    This is great, thanks!

  • @user-bp1it1xb4x
    @user-bp1it1xb4x 5 лет назад

    great video well done

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 3 года назад +1

    8:25 multiprocessing supports shared storage, but you cannot put arbitrary Python objects here, only ctypes objects.

  • @lawrencedoliveiro9104
    @lawrencedoliveiro9104 3 года назад +1

    9:07 I have wondered about constructs like
    async def myfunc ... :
    return await «expr»
    which could be simplified to
    def myfunc ... :
    return «expr»
    Given that the caller expects an awaitable in either case, the behaviour is exactly the same.

  • @SteelBlueVision
    @SteelBlueVision 6 лет назад

    As usual the links to both the slides and speakerdeck point to nothing! Please fix this.

  • @xiaolu7988
    @xiaolu7988 5 лет назад

    Can someone tell me what font he is using for his code, for example at 2:43 there?

    • @Yanonix
      @Yanonix 5 лет назад

      Probably Hack: github.com/source-foundry/Hack

    • @n7cmdr
      @n7cmdr 4 года назад +1

      It's Fira Code: github.com/tonsky/FiraCode

  • @DaLoler1
    @DaLoler1 3 года назад +1

    11:25

  • @mephistotel87
    @mephistotel87 6 лет назад +2

    1. get_nowait() raises queue.Empty exception. How do you handle that? I don't see
    2. In that case there will be raised exception from future in run_until_complete which will lead to terminating all application

    • @n7cmdr
      @n7cmdr 6 лет назад +5

      Yes, I elided the exception handling in the slides for the sake of brevity, but the code in the aiomultiprocess library correctly handles the Empty exceptions. See github.com/jreese/aiomultiprocess/blob/master/aiomultiprocess/core.py for more details.

  • @dclxviclan
    @dclxviclan Год назад

    Hmm... i look this

  • @pynchia4119
    @pynchia4119 3 года назад +2

    Great library, well done! Just relax and learn to speak in public

  • @pourimow2630
    @pourimow2630 4 года назад +2

    Why jumping through so many hoops to use Python instead of using a better programming language?

  • @kicknotes
    @kicknotes 5 лет назад +4

    I really wish speakers would learn a bit more about speaking or practice for an objective listener (for feedback) before presenting. I know nerves can be a factor, but constant "ums" and "uhs" can really detract from a presentation. This was hard for me to watch as a result of that.

    • @checkerist
      @checkerist 5 лет назад +18

      I haven't noticed this until reading your comment!

    • @therumbler
      @therumbler 5 лет назад +49

      I really wish RUclips commenters would learn a bit more about communication or practice with an objective reader (for feedback) before commenting. I know they're just trying to give advice, but the condescending tone and odd passive aggressiveness can really distract from the message. This comment was hard to read as a result of that.

    • @trixn4285
      @trixn4285 4 года назад +11

      Well, yeah, is it possible that you don't understand the topic well enough to follow so you focused on the style of presentation rather than the content? Surely it wasn't exceptionally entertaining but totally fine and with high quality information. Didn't really notice the "ums" until reading your comment. You could be a bit more thankful for being provided with quality information for free.