|
Boost Users : |
Subject: [Boost-users] Assertion `!pthread_mutex_destroy(&m)' failed
From: nmittal (nmittal_at_[hidden])
Date: 2009-06-23 13:14:33
Hi, I have a small program that receives messages asynchronously (in their
own threads). I am using boost::mutexs to synchronize access.. Please refer
to the attached code.
boost::mutex mtx_ticker_add;
int main(int argc, char *argv[]) {
//Handler Ctrl-C
signal(2, ctrl_c_handler);
while (bRun) {
sleep(1);
}
}
void ctrl_c_handler(int sig) {
cout << "Received SIGTERM" << endl;
bRun=false;
}
void onMessage( void *msg ){
mtx_ticker_add.lock();
//Do Stuff
mtx_ticker_add.unlock();
}
the program works fine and responds to messages. however I get the following
error when i press CTRL-C
mysql_dealer:
/usr/local/include/boost-1_39/boost/thread/pthread/mutex.hpp:45:
boost::mutex::~mutex(): Assertion `!pthread_mutex_destroy(&m)' failed.
any help would be much appreciated.
thanks
Nishant
-- View this message in context: http://www.nabble.com/Assertion-%60%21pthread_mutex_destroy%28-m%29%27-failed-tp24167949p24167949.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