C# Ensuring that Finalize runs on same thread when thread terminates
===

Here's a puzzle for you guys.  I have a multithreaded program in which some threads work with managed resources like locks and semaphores.  Some of the lock release primitives can only be performed from the same thread on which the lock acquire was done.

So here's my puzzle: I wrap these kinds of operations: try { lock-acquire... do something } finally { lock-release }, but sometimes when my threads terminate, the finalize operation is performed by the .NET garbage collection thread and not by my thread.  

This is a little tricky to demo; I see it all the time in Isis2, and I've figured out that this is happening by checking the thread-ids in the acquire and finalize blocks.  But I don't have a 3-line demo for you, and I am sorry about that.  I know it would make it easier to provide help.

Is there a way I can delay termination for a thread until all pending finalize blocks associated with that thread have executed?