add check for boost::thread's joinable feature before call boost::thread::join