4 ms·
It may be too late to go with the JavaScript model.
by klodolph 3y ago
It may be too late to go with the JavaScript model.
- The_Colonel 3y agoWhy?
- klodolph 3y agoThere’s a lot of deployed Python code that uses multithreading. The genie is out of the bottle, so to speak. The JavaScript model is, basically, the sub-interpreter model. You have multiple independent heaps. Given independent heaps, you write single-threaded code and don't worry about locking, because no other thread can modify objects in your heap anyway, outside of special objects like SharedArrayBuffer. Maybe you could enable GIL-free, single-threaded, sub-interpreter Python as a compile-time option. But it would break such a large amount of code out there. It would be a very difficult transition, practically speaking.