[Ecls-list] Stack saving: any interest?

Andrew Lyon orthecreedence at gmail.com
Thu Sep 11 21:28:38 UTC 2014


I'm not an ECL dev, but I would love this.

As the developer of cl-async, it's painful dealing with async code, even
with the help of futures (or promises or whatever you want to call them
nowadays). Having the ability to "fake" threading on top of an async engine
without worrying about ugly code transformations or passing futures around
everywhere would be really great.

I think CL as a whole has ignored the whole stack-saving paradigm
(continuations, coroutines, etc) to a fault, and it would be nice to have
at least one implementation that allowed real green threads (or something
like it).

A question though: would error handling/catch/throw/etc and all that work
the same when operating inside or around green threads?


On Thu, Sep 11, 2014 at 1:36 PM, Morgon Kanter <morgon.kanter at gmail.com>
wrote:

> I've been working on a resource project for developing lightweight
> ("green") threads in Common Lisp, without needing ahead-of-time code
> walking like in the green-threads library. Part of the project has
> necessitated adding the ability to save and restore the stack as part of
> the underlying Common Lisp implementation. I've chosen to use ECL for the
> project as it is a small and more easily understood codebase.
>
> My question is -- would there be any interest in merging this
> functionality back into ECL proper once I've completed it? The proposed
> interface is simply:
>
> (mp:save-stack) -- returns a stack object (can be used as a first-class
> lisp variable, garbage collected normally, etc.).
> (mp:restore-stack stack-object) -- restores the stack to that given by
> stack-object. This function does not return.
>
> Cheers,
> -- Morgon
>
>
> ------------------------------------------------------------------------------
> Want excitement?
> Manually upgrade your production database.
> When you want reliability, choose Perforce
> Perforce version control. Predictably reliable.
>
> http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
> _______________________________________________
> Ecls-list mailing list
> Ecls-list at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ecls-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20140911/bc7927f4/attachment.html>


More information about the ecl-devel mailing list