14 Oct
2009
14 Oct
'09
4:03 p.m.
How could cause this kind of behavior?
Another guess: do you call the timer functions (expires_from_now(), async_wait() ) from the thread that is running io_service or from another one? That is, who calls ProcessRTPPacket() function? If it's called from another thread, can you try the following: // instead of calling expires_from_now(), async_wait() directly... yourTimer_.get_io_service().post(boost::bind(&WaveStream::setTimer, this)); //... void setTimer() { // Some debug message, to see if the function is called. ...expires_from_now(...); ...async_wait(...); } Now see if setTimer is called. If it's not called, you've got some problem with your io_service - it's not running properly.