merging interprocess from develop

This commit is contained in:
Ion Gaztañaga
2019-02-20 09:33:09 +01:00
3 changed files with 16 additions and 1 deletions

View File

@@ -6773,6 +6773,7 @@ thank them:
* [@https://github.com/boostorg/interprocess/issues/61 GitHub Issue #61 (['"warning: struct winapi::*_BIPC has virtual functions and accessible non-virtual destructor"])].
* [@https://github.com/boostorg/interprocess/issues/64 GitHub Issue #64 (['"UBSan: runtime error: load of value 4294967295, (...) for type 'boost::interprocess::mode_t'"])].
* [@https://github.com/boostorg/interprocess/pull/68 GitHub Pull #68 (['"Prepare for C++20 and remove "throw()" usage"])].
* [@https://github.com/boostorg/interprocess/pull/70 GitHub Pull #70 (['"Fix deadlock in named_condition::notify_one"])].
[endsect]

0
include/boost/interprocess/smart_ptr/intrusive_ptr.hpp Executable file → Normal file
View File

View File

@@ -64,7 +64,21 @@ inline spin_mutex::~spin_mutex()
}
inline void spin_mutex::lock(void)
{ return ipcdetail::try_based_lock(*this); }
{
#ifdef BOOST_INTERPROCESS_ENABLE_TIMEOUT_WHEN_LOCKING
boost::posix_time::ptime wait_time
= microsec_clock::universal_time()
+ boost::posix_time::milliseconds(BOOST_INTERPROCESS_TIMEOUT_WHEN_LOCKING_DURATION_MS);
if (!timed_lock(wait_time))
{
throw interprocess_exception(timeout_when_locking_error
, "Interprocess mutex timeout when locking. Possible deadlock: "
"owner died without unlocking?");
}
#else
return ipcdetail::try_based_lock(*this);
#endif
}
inline bool spin_mutex::try_lock(void)
{