|
From: | Taylor R Campbell |
Subject: | Re: [MIT-Scheme-devel] Cleaning weak hash tables in secondary GC daemon? |
Date: | Wed, 14 Sep 2011 18:42:52 +0000 |
User-agent: | IMAIL/1.21; Edwin/3.116; MIT-Scheme/9.1 |
Date: Wed, 14 Sep 2011 19:17:09 +0100 From: Alexey Radul <address@hidden> Is there any reason why there is no secondary GC daemon that runs hash-table/clean! on all weak hash tables? Are there any issues I should be aware of before installing one to clean some select weak hash tables that are present in my program? It's not a good idea to call HASH-TABLE/CLEAN! in a GC daemon because it may rehash the table in case it has shrunk. But just cleaning the table and not shrinking & rehashing it may leave it in a bogus state. Working around this probably requires implementing a deferred-rehash mechanism. Not conceptually difficult, but it would take a bit of work.
[Prev in Thread] | Current Thread | [Next in Thread] |