Real Multithreading is Coming to Python - Learn How You Can Use It Now
date: 2023-05-16 · Tags: #pythonSimon Willison introduces 1 an article 2 about how to use Multithreading 3 feature in latest Python mainline.
Martin Heinz provides a detailed tutorial on trying out the new Per-Interpreter GIL feature that’s landing in Python 3.12, which allows Python code to run concurrently in multiple threads by spawning separate sub-interpreters, each with their own dedicated GIL.
It’s not an easy feature to play with yet! First you need to compile Python yourself, and then use APIs that are generally only available to C code.
As he mentioned, there is also an implementation of RecvChannel
and
SendChannel
classes to create channels for exchanging data (?) which fits
Armin's prediction.
My strong hunch is that the GIL does not need removing, if a) subinterpreters have their own GILs and b) an efficient way is provided to pass (some) data between subinterpreters lock free and c) we find good patterns to make working with subinterpreters work.
-- Armin Ronacher (@mitsuhiko) 4
PS: I'm also planning a framework inspired from Actor model for multithreading Python. Working on that 😭.
Footnotes
Another two cents about the current situation with the Scala user base and economics
date: 2023-05-07 · Tags: #scala, #commentaryRecently, Scala community burst a lot of discussions about the roadmap of Scala in the future, for compiler LTS support, for backward compatibility, for major language features, for user-friendly toolchains. Acutely, Kindly and Sharply.
Here are some notes about what ecosystem matters in Scala? @rssh, @alexelcu, @dspiewak, even @odersky commented to talk about their thoughts.
@rssh and @odersky both thought effect system is all of Scala, @alexelcu and @dspiewak consider Effect System is almost the most important one of Scala eco system.
They are all right, and they are not contradictory. They just see different things from different perspectives.
One very noteworthy point is
Pure Scala implementation with different backend
I especially like advanced improvements Scala 3 made as a newcome developer. Probably, I don't have too much experience in maintaining large legacy codes, I still support new features or aggresive changes, even research-orient experiments.
But I also know the importance of the ecosystem and killer applications. The AKKA license change significantly reduced the confidence and attractiveness of Scala to big giants (or not?).
As the BDFL, Martin's upcoming retirement leaves the future development of Scala uncertain. Personally, I hope Scala continues to grow and does not become a niche language.
Refs: