GNU bug report logs -
#69292
[PATCH 0/6] Prepare the database code for use in the daemon
Previous Next
Reported by: Christopher Baines <mail <at> cbaines.net>
Date: Tue, 20 Feb 2024 19:32:02 UTC
Severity: normal
Tags: patch
Done: Christopher Baines <mail <at> cbaines.net>
Bug is archived. No further changes may be made.
Full log
Message #56 received at 69292 <at> debbugs.gnu.org (full text, mbox):
Hi,
Reepca Russelstein <reepca <at> russelstein.xyz> skribis:
>> I’m all for removing ‘dynamic-wind’, we’ll have to do it to make it
>> usable in a fiberized context anyway.
>>
>> I’ll let reepca comment.
>
> What is the proper fibers-friendly replacement for dynamic-wind, anyway,
> that is "like dynamic-wind, except when suspending a fiber"? It feels
> like the current interaction between dynamic-wind and fibers is more of
> an accident of how the implementation works; I don't suppose fibers could
> export a transparent replacement, like how it already exports a
> replacement for 'sleep'? Or perhaps the underlying issue is that we
> keep using 'dynamic-wind' in situations where it only makes sense to
> enter or exit the dynamic extent once? Is it time to bring
> 'unwind-protect' back into style? I see that fibers now has a
> dynamic-wind*, should that be preferred?
I’ve come to think that ‘dynamic-wind’ is a problematic abstraction.
What we really want is to perform an effect after a normal exit or when
an exception is thrown. The latter case is actually best handled with
‘with-exception-handler’ (this is what I did for ‘with-store’; see
commit 8ed597f4a261fe188de82cd1f5daed83dba948eb).
(In Cuirass I added ‘unwind-protect’ at one point but in the end it was
not so nice and I eventually removed it.)
> I don't have a strong opinion on these changes, I just want to make sure
> we're all aware of how guile-sqlite3's sqlite-finalize acts with cached
> statements.
Agreed.
Thank you for chiming in!
Ludo’.
This bug report was last modified 1 year and 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.