[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: accept-process-output throws

From: JD Smith
Subject: Re: accept-process-output throws
Date: Sat, 27 Nov 2021 09:31:09 -0500

> In this kind of complicated situations, I usually find it much simpler
> and more efficient to run under GDB with a breakpoint on Fsignal and
> Fthrow.  Then, when one of these breaks, examine the backtrace to find
> out which code exited non-locally.

Thanks Eli.  I believe I have figured it out (without GDB’s help) — the UI I 
was using with the small timer delay was effectively wrapping my function in 
while-no-input.  The fix could have been as easy as (let (throw-on-input) ….).  
I mention this in the hopes it saves someone else a day of debugging!  

What this does make clear is that async process output and while-no-input are 
like oil and water.  It also points to the value of cancellable futures as a 
kinder way to tell a process-awaiting function “stop what you are doing, I’ve 
got more input here”.  I suppose this would require accept-process-output to 
have such a matching cancellation function, and to then signal a specific “I 
was cancelled" error.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]