diff options
| author | Pieter Wuille <[email protected]> | 2013-06-15 07:40:35 -0700 |
|---|---|---|
| committer | Pieter Wuille <[email protected]> | 2013-06-15 07:40:35 -0700 |
| commit | f5442aeef4547f013b3edec54774410507704bc6 (patch) | |
| tree | aa86f7f30acde89bb9dd63046d499c2128188903 /src | |
| parent | Merge pull request #2769 from TheBlueMatt/master (diff) | |
| parent | fixed: don't use thread::sleep_for where it's known to be broken (diff) | |
| download | discoin-f5442aeef4547f013b3edec54774410507704bc6.tar.xz discoin-f5442aeef4547f013b3edec54774410507704bc6.zip | |
Merge pull request #2766 from theuni/fix-shutdown-deadlock
Fix shutdown deadlock, ticket #2690
Diffstat (limited to 'src')
| -rw-r--r-- | src/util.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/util.h b/src/util.h index 2272ed02f..9173b5bb5 100644 --- a/src/util.h +++ b/src/util.h @@ -20,6 +20,7 @@ #include <vector> #include <string> +#include <boost/version.hpp> #include <boost/thread.hpp> #include <boost/filesystem.hpp> #include <boost/filesystem/path.hpp> @@ -104,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)); |