| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
The main tealet (the one calling in to python) must be suspended and the top level tasklet evaluation loop run in a worker, because soft switching may have the main tasklet run in an arbitrary tealet when it exits. It then needs to switch back to the 'main' tealet. The only way to do this is to have the 'main' tealet in a known state. In the old system, it was possible to switch back to a known state of the main stack, creating a duplicate on the fly. Tealets are more strict because a tealet are more like threads: each can only run a function, not extend back from its invocation point.
This is safe and recommended, structs have their own namespace and their names don't clash with typedefs.
tealet to return to. This also removes then need to tweak it in the test_outside function.
re-implement stackless.uncollectable.
The platf/ files are still present in the repo.
Fix cleanup to work properly.
We now just call a callback for the initial stub. There is no need to mess with cframes and such stuff.
This is a lot of legacy, it should all work through tealets now.
soft-swiching of the main tasklet, and the consequence of the main tasklet being executed on a different stack when it exits, it is much simpler to simply force hard switching for the main tasklet. This means that the main tasklet always runs on the stack provided by the caller into the python library, including whatever stack exception handlers they provided. This removes the need to have the main tealet suspended while stackless runs.
Unittest test_thread are broken here and need fixing.
|
Thanks, this is great for historical reasons :) |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is the historical patch for issue #10 from Kristján Valur Jónsson.
I converted this patch from a backup of the original mercurial repository available from https://bitbucket-archive.softwareheritage.org/projects/kr/krisvale/stackless-tealet.html.