Python will get true threading support with the removal of the GIL (Global Interpreter Lock) in 3.13 (now available in the beta as an experimental option).

The GIL has long crippled Python’s threading capabilities, but will be getting true parallelism with the implementation of PEP 703.

What are you gonna do with real threads? 🤔

  • Qutorial@lemmy.worldOP
    link
    fedilink
    arrow-up
    3
    ·
    1 month ago

    But with multiprocessing you’re paying extra cycles to serialize and deserialize with those data structures (plus the added cost of storing copies in multiple places), and processes are much heavier to spin up…

    • pelya@lemmy.world
      link
      fedilink
      arrow-up
      1
      ·
      1 month ago

      Yeah, there is overhead. It’s not so critical for Python, because I am using it for scripting and prototyping, and when I need performance, I rewrite critical code parts in C++.