Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 VC++ Threading
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
cluncky




PostPosted: Tue Feb 28, 2012 5:11 pm   Post subject: VC++ Threading

In my code I create 5 threads that run the same procedure but with a different parameter. Unless an error occurs or I terminate the thread it will continue on forever. I want to terminate the thread based on input but I first need to execute a certain command within the thread to maintain the integrity of the data. Is there a way to run a few lines of code from the main thread that execute within the child thread before I terminate it? I can't include it within the method being run in the child thread because I require input from the main thread before terminating the child thread.

Any help is appreciated.
Sponsor
Sponsor
Sponsor
sponsor
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 1 Posts ]
Jump to:   


Style:  
Search: