|
Boost Users : |
Subject: [Boost-users] Thread function only called one time. why?
From: young (yqin_99_at_[hidden])
Date: 2012-08-21 17:28:29
I have a MFC application which use boost thread. I have created several
threads like m_pReadThread / m_pProcessThread / m_pWriteThread
m_pProcessThread = boost::shared_ptr<boost::thread>(new
boost::thread(boost::bind(&CMFCDlg::ProcessThreadBoost, this)));
in each thread, the thread function structure looks like:
{
init;
while(run == true)
{
// set break point here
...
}
cleanup code; // set break point here
}
I set break point When I run my application, one of the thread only reach
the first break point once. The second break point never reached. What might
be the problem?
Since the code is part of a big project. I can not put code here.
-- View this message in context: http://boost.2283326.n4.nabble.com/Thread-function-only-called-one-time-why-tp4634575.html Sent from the Boost - Users mailing list archive at Nabble.com.
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net