In answering another question* on SO, and the subsequent comment discussion, I ran into a wall on a point that I'm not clear on.
Correct me on any point where I'm astray...
When the Garbage Collector collects an object, it calls that object's finalizer, on a separate thread (unless the finalizer has been suppressed, e.g. through a Dispose()
method). While collecting, the GC suspends all threads except the thread that triggered the collection (background collection aside).
What isn't clear:
* Link to the original question:
.NET GC Accessing a synchronised object from a finalizer