diff options
author | MarcoFalke <falke.marco@gmail.com> | 2020-05-28 08:54:58 -0400 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2020-05-28 10:22:36 -0400 |
commit | fab2950d703217ec34b27e677e4f33ebbf99ca08 (patch) | |
tree | b15599f5c81b5968168f9e6a26c481b66b0896b8 /src/scheduler.h | |
parent | fa9819695aac260be0ba170eb15ecba8cb519843 (diff) |
doc: Switch boost::thread to std::thread in scheduler
After commit d0ebd93 the scheduler itself no longer cares if the
serviceQueue is run in a std::thread or boost::thread. Change the
documentation to std::thread because we switched to C++11.
Diffstat (limited to 'src/scheduler.h')
-rw-r--r-- | src/scheduler.h | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/scheduler.h b/src/scheduler.h index 1e64195484..29f005d49c 100644 --- a/src/scheduler.h +++ b/src/scheduler.h @@ -5,11 +5,6 @@ #ifndef BITCOIN_SCHEDULER_H #define BITCOIN_SCHEDULER_H -// -// NOTE: -// boost::thread should be ported to std::thread -// when we support C++11. -// #include <condition_variable> #include <functional> #include <list> @@ -26,7 +21,7 @@ // CScheduler* s = new CScheduler(); // s->scheduleFromNow(doSomething, std::chrono::milliseconds{11}); // Assuming a: void doSomething() { } // s->scheduleFromNow([=] { this->func(argument); }, std::chrono::milliseconds{3}); -// boost::thread* t = new boost::thread(std::bind(CScheduler::serviceQueue, s)); +// std::thread* t = new std::thread([&] { s->serviceQueue(); }); // // ... then at program shutdown, make sure to call stop() to clean up the thread(s) running serviceQueue: // s->stop(); |