mirror of
https://github.com/dashpay/dash.git
synced 2024-12-29 13:59:06 +01:00
fixed: don't use thread::sleep_for where it's known to be broken
Fixes #2690.
This commit is contained in:
parent
8ae8e62355
commit
f85096b30a
@ -105,7 +105,11 @@ T* alignup(T* p)
|
||||
|
||||
inline void MilliSleep(int64 n)
|
||||
{
|
||||
#if BOOST_VERSION >= 105000
|
||||
// Boost's sleep_for was uninterruptable when backed by nanosleep from 1.50
|
||||
// until fixed in 1.52. Use the deprecated sleep method for the broken case.
|
||||
// See: https://svn.boost.org/trac/boost/ticket/7238
|
||||
|
||||
#if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200)
|
||||
boost::this_thread::sleep_for(boost::chrono::milliseconds(n));
|
||||
#else
|
||||
boost::this_thread::sleep(boost::posix_time::milliseconds(n));
|
||||
|
Loading…
Reference in New Issue
Block a user