Can you emulate threads in the interpreter instead of relying on an OS-specific thread implementation?
1: Unfortunately, the interpreter pushes at least one C stack frame for each Python stack frame. Also, extensions can call back into Python at almost random moments. Therefore, a complete threads implementation requires thread support for C. Answer 2: Fortunately, there is Stackless Python, which has a completely redesigned interpreter loop that avoids the C stack. It’s still experimental but looks very promising. Although it is binary compatible with standard Python, it’s still unclear whether Stackless will make it into the core — maybe it’s just too revolutionary.
Related Questions
- Python FAQ: 4.11 Can you emulate threads in the interpreter instead of relying on an OS-specific thread implementation?
- Can you emulate threads in the interpreter instead of relying on an OS-specific thread implementation?
- Does the manifold require PTFE thread sealing tape on the threads where it connects to the tank?