[Top][All Lists]

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

Re: port-for-each vs lazy sweep

From: Ludovic Courtès
Subject: Re: port-for-each vs lazy sweep
Date: Mon, 20 Aug 2007 10:42:07 +0200
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)


Kevin Ryde <address@hidden> writes:

> I suppose either port-for-each should ignore ports which are unmarked
> and unswept; or the gc should sweep the port table entries immediately
> instead of lazily.  Neither sounds pretty, but the latter might be safer
> than letting zombies remain in the port table.

In the latter case, GC would modify the port table, potentially beneath
the feet of functions that iterate over it, or that cached indices
within the table, things like that.  So the former would seem safer,
wouldn't it?

> I suspect for instance
> `flush-all' could suffer the same problem if it does a callback to a
> soft port flush function (or a C code ptob flush func if that somehow
> provoked some sweeping).


> (This got me wondering why there's a port table anyway, instead of
> independent objects with say a weak hash table for the "list of all
> ports" needed by port-for-each and flush-all.  Historical reasons I
> suppose.)

Why don't we remove it in HEAD?  :-)

Furthermore, `port-for-each' is questionable from a security viewpoint,
and I'm not sure it's very useful either (I haven't checked its current
uses, though).


reply via email to

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