Click here to Skip to main content
15,911,646 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to stop the thread if it's running? Pin
mikert_200829-Apr-09 21:01
mikert_200829-Apr-09 21:01 
AnswerRe: How to stop the thread if it's running? Pin
CPallini29-Apr-09 21:06
mveCPallini29-Apr-09 21:06 
GeneralRe: How to stop the thread if it's running? Pin
mikert_200829-Apr-09 21:19
mikert_200829-Apr-09 21:19 
GeneralRe: How to stop the thread if it's running? Pin
Cedric Moonen29-Apr-09 21:29
Cedric Moonen29-Apr-09 21:29 
GeneralRe: How to stop the thread if it's running? Pin
Rajesh R Subramanian29-Apr-09 22:05
professionalRajesh R Subramanian29-Apr-09 22:05 
GeneralRe: How to stop the thread if it's running? Pin
Cedric Moonen29-Apr-09 22:11
Cedric Moonen29-Apr-09 22:11 
GeneralRe: How to stop the thread if it's running? Pin
Rajesh R Subramanian29-Apr-09 22:19
professionalRajesh R Subramanian29-Apr-09 22:19 
GeneralRe: How to stop the thread if it's running? Pin
CPallini29-Apr-09 21:40
mveCPallini29-Apr-09 21:40 
GeneralRe: How to stop the thread if it's running? [modified] Pin
Rajesh R Subramanian29-Apr-09 22:00
professionalRajesh R Subramanian29-Apr-09 22:00 
NewsRe: How to stop the thread if it's running? Pin
Roger Stoltz29-Apr-09 22:26
Roger Stoltz29-Apr-09 22:26 
GeneralRe: How to stop the thread if it's running? Pin
Rajesh R Subramanian29-Apr-09 22:30
professionalRajesh R Subramanian29-Apr-09 22:30 
GeneralRe: How to stop the thread if it's running? Pin
Roger Stoltz29-Apr-09 22:35
Roger Stoltz29-Apr-09 22:35 
GeneralRe: How to stop the thread if it's running? Pin
Rajesh R Subramanian29-Apr-09 22:51
professionalRajesh R Subramanian29-Apr-09 22:51 
QuestionRe: How to stop the thread if it's running? Pin
CPallini29-Apr-09 22:42
mveCPallini29-Apr-09 22:42 
AnswerRe: How to stop the thread if it's running? Pin
Rajesh R Subramanian29-Apr-09 22:49
professionalRajesh R Subramanian29-Apr-09 22:49 
AnswerRe: How to stop the thread if it's running? Pin
Roger Stoltz29-Apr-09 22:52
Roger Stoltz29-Apr-09 22:52 
CPallini wrote:
Rajesh R Subramanian wrote:

It cleans up its own mess, unless you set the m_bAutoDelete variable to TRUE before the thread starts.


Is quite the opposite, I suppose. Am I wrong?



Just to be clear:
If CWinThread::m_bAutoDelete is set to TRUE, the destructor closes the thread handle. To be able to wait on the thread handle from another thread m_bAutoDelete must be set to FALSE.


"It's supposed to be hard, otherwise anybody could do it!" - selfquote
"High speed never compensates for wrong direction!" - unknown


GeneralRe: How to stop the thread if it's running? Pin
Rajesh R Subramanian29-Apr-09 22:56
professionalRajesh R Subramanian29-Apr-09 22:56 
GeneralRe: How to stop the thread if it's running? Pin
Roger Stoltz29-Apr-09 23:04
Roger Stoltz29-Apr-09 23:04 
GeneralRe: How to stop the thread if it's running? Pin
Rajesh R Subramanian29-Apr-09 23:11
professionalRajesh R Subramanian29-Apr-09 23:11 
GeneralRe: How to stop the thread if it's running? Pin
CPallini29-Apr-09 23:34
mveCPallini29-Apr-09 23:34 
GeneralRe: How to stop the thread if it's running? Pin
CPallini29-Apr-09 23:32
mveCPallini29-Apr-09 23:32 
GeneralRe: How to stop the thread if it's running? Pin
Roger Stoltz29-Apr-09 23:40
Roger Stoltz29-Apr-09 23:40 
GeneralRe: How to stop the thread if it's running? Pin
CPallini29-Apr-09 23:44
mveCPallini29-Apr-09 23:44 
GeneralRe: How to stop the thread if it's running? Pin
Rajesh R Subramanian29-Apr-09 22:45
professionalRajesh R Subramanian29-Apr-09 22:45 
GeneralRe: How to stop the thread if it's running? Pin
mikert_200830-Apr-09 0:26
mikert_200830-Apr-09 0:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.