4 ms·
The whole threading library in Python is a mess. Python was designed around single threaded programs with shared-nothing state and the cracks show as you move
by loeg 7y ago
The whole threading library in Python is a mess. Python was designed around single threaded programs with shared-nothing state and the cracks show as you move beyond that. The whole idea of replacing the GIL with... multiple same-process distinct-state Python interpreters with cheap-ish message passing sort of highlights how ugly it gets.
- h2odragon 7y agoBack around python 1.5, there was almost a fork of python where every object had locks, there were memory arenas, and multiprocessing was almost thoughtlessly easy. That and stackless would've been great.
- PixyMisa 7y agoIt was also terribly slow. IronPython did that too, on .Net. It ran around one quarter the speed of CPython.
- loeg 7y agoMore recently than that, too, unless I'm misremembering. As sibling commenter points out, such a model is horrifically slow. Lock-for-every-object is too granular to perform well.