Example #1
0
void stopLogThread()
{
    if (LogThreadWork.get())
    {
        LogThreadWork.reset();
        LogIoService.stop();
        LogThread.try_join_for(boost::chrono::milliseconds(100));
    }
}
Example #2
0
	// --------------------------------------------------------------
	/// Mimics boost:thread::try_join_for().
	/// @param[in] rel_time_ - relative time from now
	/// @return - true if *this refers to a thread of execution on entry,
	///  and that thread of execution has completed before the call times
	///  out, false otherwise
	virtual bool try_join_for(boost::chrono::milliseconds const& rel_time_) {
		return _thread.try_join_for(rel_time_);
	}