[Stackless] stacklesslib & tealet

Richard Tew richard.m.tew at gmail.com
Thu Apr 18 02:23:46 CEST 2013


On Thu, Apr 18, 2013 at 2:57 AM, Kristján Valur Jónsson
<kristjan at ccpgames.com> wrote:
> Then there is the tealet lib.
>
> This is code from Armin Rigo, basically a further factoring out from
> greenlets.  It is a pure C library that implements stack slicing without any
> reference to Python at all.  Use this to bring the magic of stack slicing to
> your stack based program.
>
> I have been tinkering with Armin‘s code for some two years now.  I added
> some robustness features (error handling) and optimized the stack handling
> in various ways.  Tealets can now be duplicated and this used to create
> ‚stub‘ tealets for spawning new ones, rather than always spawning a new
> tealet off from the current stack position.
>
> There is also a pytealet module that provides a (2.7) extension module, and
> a greenlet.py emulation module that re-implements greenlets on top of
> tealets.
>
>
>
> Check it out at https://bitbucket.org/krisvale/tealet  (I´ve forked this out
> of my „public“ repo, go to krisvale/public for the full revision history)

What is the license of tealets?  Has it been derived from any parts of
Stckless, which might force an derivative usage Python license on it?

Do you have any future plans for it?

It compiles okay on mingw / Windows 7 (64 bit), but tests do not do so well:

$ make tests
gcc -g -o run_tests_static_g tealet.c tests.c
run_tests_static_g
+++ Running tests with newmode = 0
+++ Running test 0... +++
+++ Running test 1... +++
+++ Running test 2... +++
+++ Running test 3... +++
+++ Running test 4... +++
+++ Running test 5... +++
+++ Running test 6... +++
+++ All ok. +++
+++ Running tests with newmode = -1
+++ Running test 0... +++
+++ Running test 1... +++
+++ Running test 2... +++
+++ Running test 3... +++
+++ Running test 4... +++
+++ Running test 5... +++
+++ Running test 6... +++
+++ All ok. +++
gcc -g -O2 -o run_tests_static_o tealet.c tests.c
run_tests_static_o
+++ Running tests with newmode = 0
+++ Running test 0... +++
+++ Running test 1... +++
Assertion failed: g_main->g_current == (tealet_sub_t *)g_main, file tealet.c, li
ne 625

Thoughts? :-)

Cheers,
Richard.



More information about the Stackless mailing list