Quote Originally Posted by Igor Vartanov View Post
Quote Originally Posted by troutguy View Post
Any comments?
Only one: Wrong forum.
... and another (rather) short one (sorry, I know it's off-topic here...):

Thread::Join() is a blocking operation, i.e. it doesn't return until the worker function of the respective thread itself has returned. So your shutdown loop may easily cause a deadlock if there are any synchronization inter-dependencies between the individual worker threads.

Also, it's not clear what class startTheServer() is a member of, IOW what this represents inside this function. However, the presence of the setText() member suggests it's some sort of GUI object or at least manipulates one. You need to be aware that in a Windows Forms app GUI manipulations are only allowed to be made by the GUI thread (IOW the application's main thread). Failure to observe this rule may lead to all sorts of weird (i.e. undefined) behaviour, including your program seemingly working without problems, leading to a false sense of safety.

BTW, the correct forum section for C++/CLI questions like this one is: http://forums.codeguru.com/forumdisp...ed-C-and-C-CLI