[PATCH] Bugfix and drop weak references to finalizable objects (was: Re: [PATCH] thread-safe handling of asynchronous events)

2023-07-07 Thread felix . winkelmann
> On Thu, Jul 06, 2023 at 09:05:03PM +0200, felix.winkelm...@bevuta.com wrote: > > > This would be problematic if the finalizer has run and deleted the > > > foreign object, while there are still weak references that hold onto > > > the object. This has then become invalid/inconsistent. > > > > I

[PATCH] Bugfix and drop weak references to finalizable objects (was: Re: [PATCH] thread-safe handling of asynchronous events)

2023-07-07 Thread felix . winkelmann
> While working on this, I also noticed a remaining bug in the weak locative > handling: when a locative has already been cleared, it contains a NULL > pointer, and we need to avoid dereferencing it on the next GC. Thanks, pushed. felix

[PATCH] Bugfix and drop weak references to finalizable objects (was: Re: [PATCH] thread-safe handling of asynchronous events)

2023-07-07 Thread Peter Bex
On Thu, Jul 06, 2023 at 09:05:03PM +0200, felix.winkelm...@bevuta.com wrote: > > This would be problematic if the finalizer has run and deleted the > > foreign object, while there are still weak references that hold onto > > the object. This has then become invalid/inconsistent. > > I don't

[PATCH] finalizer API (was: thread-safe handling of asynchronous events)

2023-07-07 Thread felix . winkelmann
Here another attempt at a finalizer API, allowing adding finalized objects to an existing finalizer after it was created. felix From 89b181be98685943425aae646ee724e9d59a2bec Mon Sep 17 00:00:00 2001 From: felix Date: Fri, 7 Jul 2023 10:40:58 +0200 Subject: [PATCH] Added thread-safe finalization