> Letting the program continue execution during the mark phase could cause
> synchronization problems where a weakly-referenced object is marked for
> collection, then referenced (assigned to a strong reference), then
> deleted despite now being strongly-referenced.

Hmm. Good points.  I suppose that would err.

> Does your patch cause errors in programs that use ObjectSpace.each_object
> heavily, or those that use weak references heavily?

Again--I suppose if you did something like

GC.start #fire the child thread
a = []
GC.each_object { |o| a << o } # grab a reference to previously freeable objects

That too would blow up :)
A way to avoid this [as Boehm does (?)] would be to throw up a write
barrier during collection and search it in the parent thread for new
references--I am somewhat scared of doing so since it sounds hard :)

I'm not sure what its relationship to a parallel collector is but they
sure sound related.

Thanks.
-=R