I have a class that inherits System.ComponentModel.Component. The component spawns a bacground thread that makes a long blocking call that waits for outside event. In my Dispose the thread is signaled to finish its call and return. Can I be sure that app will always call my Dispose? How can I ensure that my thread does not linger and prevent client app from terminating?
I have a class that inherits System.ComponentModel.Component. The component spawns a bacground thread that
Share
Make the thread a background thread via
Thread.IsBackground. This will keep the thread from keeping the process alive.