[gclist] Thread safe GC

stuart stuart@cosc.canterbury.ac.nz
Tue, 15 Apr 1997 08:18:37 +1200


> If I can't stop and restart threads I'm totally stuck. I can't really
> collect for running threads.

I'm speculating here, but, in theory, shouldn't you be able to
collect in the multithreaded situation using thread priorities ?

What i mean is, at the start of the collection, raise the priority
of the collector thread to n+1 (where n in the previous highest
priority, and high n = high priority), and scan the stacks of threads
at piority n. When all stacks at priority n have been scanned, lower 
the collector thread to priority n and start scanning the stacks 
priority n-1.

This wouldn't require the ability to stop threads, but if non-gc threads
changed their priorities, you'd be lost.

stuart


-- 
         stuart yeates <stuart@cosc.canterbury.ac.nz> aka `loam'
           --- reality is for those who don't write poetry ---