Sprints (original) (raw)
:code-block:`Image:christian_tismer.jpg,nolink`
- On the first day I gave a talk which should introduce everybody to Stackless and how it works. With bad preparation, I failed to do a good job on motivating beginners, and Martina dropped off, disappointed. (I still hope to get her interested in PyPy.) Later on, I could make it a little better, not always diving deeply into internals but showing the current API and the thoughts behind that.
- On the second day, I gave a couple of interactive debugger sessions, showing how the interpreter normally works, how it works in Stackless mode, and how switching between tasklets happens. I think this was quite informative for everybody. Lutz took video recordings, and I'm curious to see them on this site!
- We had many discussions about the API, and the idea came up that tasklets are even a too large design with too much predefined behavior, and it would be better to find a smaller structure and to implement tasklets on top of it.
- Everybody was trying to make some sense out of Stackless, to learn how to use it, and I gave as much help as I could. Some concepts were hard to explain in newbie recipes, and we added a few new methods which look more natural to beginners.
- I did some bug fixes and small changes to support the new pre-emptive scheduling, and although I wanted to avoid deep hacking by myself, I wasted almost two days trying to remove the
f_callee
field and replacing it by a better concept, but failed.- Enhanced pre-emptive scheduling a little by making sure that a tasklet that was in atomic mode while an interrupt occured gets the delayed interrupt request immediately after it released the atomic flag. One of the seldom changes which work instantly.
- Armin asked me many questions about the hows and whys of the implementation, and he asked me astonishingly much about the hardware switching, intial stub, initialization and all the complexity which is introduced by the need to have a main tasklet in place.
- On the last day, he presented me a very small, very clean implementation of "greenlets", which do the hardware switching stuff with the existing library, but implemented as an extension to regular Python! Armin and I had a very long discussion last night, and we found out how to harmonize soft and hard switching in a single concept, which is applicable to any programming language. This is the begining of a completely new implementation of the Stackless kernel, and most probably of a new, general green thread package which is as efficient, clean and small as nothing else before.
Things I'm going to do:
- Continue to take care of Stackless of course, making sure that all the new developers stay happy and that they continue to provide more such great documentation, tests, examples, and enhancements.
- Write documentation, sample code, explain the inner machinery, as it is now and as it should be in the future.
- Enhance the functionality of the website, to make it easy to upload sample code which should possibly also run on the site, have downloadable installation packages, allow users to add to wiki pages, and more.
The following is a list of things to newly develop, but I don't mean to do that alone. Participation is most welcome, this is more a to-do list than my own commitment:
- Re-implement microthreads based upon tasklets, since people are asking for this since 2002.
- Create a new branch for Stackless for Python 2.4, in order to be ready with a Stackless release when Python 2.4 is ready.
- Create a new branch of Stackless which is the bare minimum to support non-recursive calls, no tasklets, no pickling, minimizing the patches to the Python code base.
- Create an extension module which does the pickling "from outside", without patching the built-in types in any way. Instead, everything will register itself in the
copy_reg
module.- Create new hard and soft switching based upon the phantastic "greenlet" idea. I'm undecided whether to do it as an extension in the first place, but the chance to get rid of most of the current machinery is most challenging.
- Create tasklets and channels as a Python module, based upon greenlets, for testing and documentation purposes.
- Implement tasklets as a C extension, based upon greenlets, for compatibility purposes.
- All I forgot to mention here should be added, virtually.
There are lots of other things to do, especially supporting disemination. My heavy side was always on technical issues, but fortunately I'm no longer alone and can rely on the help and support of the group, which makes me very happy.
Sincerely -- chris