Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Looking for an event before threads exit

1 view
Skip to first unread message

Itai Frenkel

unread,
Nov 16, 2009, 9:32:02 AM11/16/09
to
Hello,

I'm looking for a CLR event (or hook) that allows running .NET code on that
same thread before it terminates. This hook should work for both "new
Thread()" and also threads from thread pools.

The code must run on the thread itself (and not on the Finalizer thread).

Such low level hook exists in native code (DllMain), however that code runs
under the OS loader lock which causes deadlocks.

Any pointers and ideas would be appreciated.

Regards,
Itai

0 new messages