Replaces boost::thread::sleep_for with C++ equivalent.
Removes ugly boost sleep_for version check and compatibility control structure.
Not meant for 0.15.
Replaces boost::thread::sleep_for with C++ equivalent.
Removes ugly boost sleep_for version check and compatibility control structure.
Not meant for 0.15.
Very nice! Concept strong ACK :-)
Great!
可能还有细节需要考虑。
Yes, we can't do this just yet. This would make MilliSleep non-interruptible, meaning that a few threads (see upnp for an easy example) would hang around for several minutes before dying.
Due to the renewed interest (see #10923) as well, I'll finish up the std thread/mutex/condvar conversion asap so that we can proceed with changes like these. There aren't many left now.
10 | @@ -11,6 +11,9 @@ 11 | #include <boost/thread.hpp> 12 | #include <boost/test/unit_test.hpp> 13 | 14 | +#include <chrono>
Remove, it's included in thread header.
10 | @@ -11,6 +11,9 @@ 11 | #include <boost/thread.hpp> 12 | #include <boost/test/unit_test.hpp> 13 | 14 | +#include <chrono> 15 | +#include <thread>
Include before boost headers.
9 | @@ -10,9 +10,10 @@ 10 | #include "utiltime.h" 11 | 12 | #include <atomic> 13 | +#include <chrono>
Remove.
Closing for now, as we can't do this yet. Please rebase and reopen once the dependencies went in.
After f26866b9caf9ff27d129c703f51b8c2922000243, this should now be possible to do. See here: #16117