[Nickle] User trap revisited---setjmp() at top level

nickle@po8.org nickle at po8.org
Sun Feb 12 17:37:07 PST 2006


I just got bit by an old user trap again, and wanted to
vent.  Also, I'm hoping there's an easy fix.

If you capture a continuation via setjmp() at top level in
Nickle, when you longjmp() through it execution continues in
the thread that captured the continuation.  Unfortunately,
in the current implementation each top-level statement is
executed in its own thread.  This is confusing, to say the
least.

I think it should be possible to make setjmp() throw an
exception when called at top level, no?  And isn't this what
is wanted, given that it's going to behave in such a
surprising fashion?

    Bart


More information about the Nickle mailing list