Sean Kelly Wrote: > There's another important issue that hasn't yet been addressed, which is that > when the GC collects memory, the thread that finalizes non-shared data should > be the one that created it. So that SHARED flag should really be a thread-id > of some sort. Alternately, each thread could allocate from its own pool, > with shared allocations coming from a common pool. This would allow the lock > granularity to be reduced and in some cases eliminated.
Why not run the collection for a single thread in the thread being collected? It's a simple way to force where the finalizer runs. It's a big step up from stop-the world collections, but still requires pauses.