All:
I have a problem in which a worker thread in my (.dll) assembly isn't
allowing the main (.exe) assembly from terminating.
Here's the scenario:
1) App.Exe is launched.
2) App.Exe calls into my .dll (Sub.Dll)
This call causes the method in Sub.Dll to spawn a worker thread that I want
to hang around (monitoring the status of an environment parameter) for as
long as the parent process lives; i.e. until the main thread in App.Exe
returns/exits, the close button clicked on the Window frame, etc.
The problem is that I can't seem to find any way to get notification when
this main application wants to terminate. As such, my worker thread is
preventing App.Exe from closing.
I've tried subscribing to the App Domain's ProcessExit event, but that event
didn't fire in my subordinate assembly.
Any help would be appreciated.
Thanks,
Bill