Pumping

An interesting snippet from Chris's last post:


A light-weight way to pump is to call Thread.CurrentThread.Join(0).  This causes the current thread to block until the current thread dies (which isn’t going to happen) or until 0 milliseconds have elapsed – whichever happens first.  I’ll explain later why this also performs some pumping and why this is a controversial aspect of the CLR.  A heavier-weight way to pump is to call GC.WaitForPendingFinalizers.  This not only performs pumping, but it also waits for the Finalization queue to drain.

That actually sounds fairly useful.  And it's undocumented.  Doh.  That means people will use it, and it'll end up either breaking apps, or being something they have to support forever.