Emulating Stackless and greenlet with each other
summary
Builds working Stackless↔greenlet emulation layers and runs a battery of compatibility tests; most core operations — switch, spawn, and task-local dictionary access — pass but several implementations fail due to reference-counting failures and subtle exception-handling differences (exception message and traceback edge cases). Discovers task-local storage semantics and stack-frame local variables are the hardest to emulate, confirms thousands of lightweight tasks run but CPU-bound limits remain, and documents which emulators fully pass the test suite and which need fixes.
AI-written summary · about
chapters (13)
- 0:00Introduction to talk
- 1:34Explicit scheduling in Stackless
- 5:08Generators and coroutines in Python
- 7:11Coroutine libraries and resumption
- 9:57Basic operations of Stackless and greenlet
- 11:21Emulation attempts and challenges
- 16:58Testing and correctness of emulators
- 22:26Exception handling in coroutines
- 31:04Local variables in coroutines
- 37:00Environment limits and scalability
- 41:19Implementation limitations
- 43:55JavaScript coroutines and memory
- 50:18Generators and function calls
related talks
26mGo Stack: Should It Be Moving Like That?
34mContinuations - Under the Covers
36mProject Loom
51mGame of Loom: implementation patterns and performance implications playing with
02h 01mWorkshop: Java Concurrency Stress (JCStress). Part 2
01h 01mStructured Networking
01h 01mProject Loom: Revolution in Concurrency or Obscure Implementation Detail?
01h 04mParallel Game Engine Design
