Re: SBCL Fibers proposal

Anthony Green <[email protected]> Sun, 1 Mar 2026 15:08:17 -0500
Newsgroups gmane.lisp.steel-bank.devel
Message-ID <CACxje59xX0xSdnoT5YPArQ3LNfYQgGR6EXQLFNrGtVfTpj6YKQ@mail.gmail.com>
Here's the fix, including test cases.   We can detect non-local exits out
of the fiber in the trampoline's unwind-protect cleanup, and record a
descriptive error in fiber-result so it's visible via fiber-join.

https://github.com/atgreen/sbcl/commit/7cbf5c1ebe6136a5a342b6456b58940b774324df

Thanks for catching this!

AG

On Sun, Mar 1, 2026 at 2:15 PM Anthony Green <[email protected]> wrote:

> Ah.. I gotcha.  This is tricky.  I'm looking into it.
>
> AG
>
>
> On Sun, Mar 1, 2026 at 1:37 PM Michał "phoe" Herda <[email protected]>
> wrote:
>
>> W dniu 2026-03-01 19:27, Anthony Green napisał(a):
>>
>> THROW to a tag not established within the fiber signals "tag does not
>> exist", caught by the handler-case. RETURN-FROM and GO can't cross fiber
>> boundaries.  They're lexically scoped (same constraint as threads).
>>
>>
>> THROW is fully dynamically scoped, I see you're taking that into account.
>>
>> I'm talking about a case where - for whatever reason - the host thread
>> closes over a TAGBODY tag or a BLOCK name, then winds itself further, and
>> then executes the matching RETURN-FROM or GO closure within the context of
>> a fiber running on the same thread. How does unwinding work in this case?
>>
>

_______________________________________________
Sbcl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sbcl-devel