
it worked! Thank you so much Igor. I changed it this way: int main(int argc, char* argv[]) { boost::asio::io_service::work work(io_service); boost::thread thrd_io(boost::bind(&boost::asio::io_service::run, &io_service)); boost::thread workerThread(workerFunc); ... } Can I ask why we needed io_service::work? in windows, it did not require it. Thanks, mustafa below is the output after i used it. $./timer main: startup main: after thrd_io main: after workerThread Worker: running Starting synchronous wait Finished synchronous wait Starting asynchronous wait timer is set to expire at '1336684315' Finished asynchronous wait handle_timeout Worker: finished -- View this message in context: http://boost.2283326.n4.nabble.com/The-callback-of-the-timer-inside-a-thread... Sent from the Boost - Users mailing list archive at Nabble.com.