I have written an application that launches approximately 150 threads with
Thread.ThreadStart()
Each thread uses CDO 1.21 to logon to a different Exchange mailbox and
send/receive a number of mail messages, reporting back to the UI thread
through the use of a Queue object. When all messages that are expected have
been received, each thread sends a final update to the UI and the method
should exit, which should terminate the thread.
Everything works well for the most part, although I am doing battle with the
Outlook Security dialog on some mailboxes.
When all threads have completed their work, the Exit button on the UI is
enabled. When I click it, the Appilcation.Exit() function is called, and the
UI disappears, but the application continues to run. In the debug
environment eventually I get a thread deadlock message. At this point, there
should only be one thread running.
I have read numerous articles on threading and examined many samples and
cannot see anything wrong with the way I have coded this application.
If anyone has experienced this type of problem, or has a suggestion on how I
could try to nail this down, I would appreciate it. Is it possible the CDO
object is part of the problem?
Thanks in advance
Steve