2
0
mirror of https://github.com/boostorg/thread.git synced 2026-02-09 11:32:12 +00:00

Thread: remove dependency from boo_thread to boost_chrono

[SVN r80122]
This commit is contained in:
Vicente J. Botet Escriba
2012-08-21 21:20:41 +00:00
parent 5b26427079
commit 5fa5b680f0
4 changed files with 56 additions and 66 deletions

View File

@@ -334,29 +334,6 @@ namespace boost
return true;
}
#ifdef BOOST_THREAD_USES_CHRONO
bool thread::try_join_until(const chrono::time_point<chrono::system_clock, chrono::nanoseconds>& tp)
{
if (this_thread::get_id() == get_id())
{
boost::throw_exception(thread_resource_error(system::errc::resource_deadlock_would_occur, "boost thread: trying joining itself"));
}
detail::thread_data_ptr local_thread_info=(get_thread_info)();
if(local_thread_info)
{
chrono::milliseconds rel_time= chrono::ceil<chrono::milliseconds>(tp-chrono::system_clock::now());
if(!this_thread::interruptible_wait(local_thread_info->thread_handle,rel_time.count()))
{
return false;
}
release_handle();
}
return true;
}
#endif
void thread::detach() BOOST_NOEXCEPT
{
release_handle();