Garbage collection progress delegate

Mike Capp mike.capp at gmail.com
Mon Apr 10 12:11:30 PDT 2006


In article <e1e9rp$5tp$1 at digitaldaemon.com>, Craig Black says...
>
>Given the current state of things, garbage collection could cause dramatic 
>pauses.  Is there any way that the garbage collector could have some 
>delegate to post its progress?  The delegate would be invoked passing the 
>estimated length of time it will take to perform the collection, say once 
>every second or once every half a second.  This allow the application to 
>post the progress to give the user feedback as to what is happening and how 
>long it is going to take.

I don't see how. Any estimate made before the GC starts would be very crude.
Probably no better than assuming that it'll take as long as it did last time,
and you can do that yourself.

Estimates partway through the collection might be more accurate, but not very
useful, since you probably can't do very much with them without potentially
invalidating all the work the GC has done so far.

cheers
Mike





More information about the Digitalmars-d mailing list