mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-06-25 16:31:29 +02:00
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.
This commit is contained in:
parent
fa9819695a
commit
fab2950d70
@ -5,11 +5,6 @@
|
|||||||
#ifndef BITCOIN_SCHEDULER_H
|
#ifndef BITCOIN_SCHEDULER_H
|
||||||
#define 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 <condition_variable>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
#include <list>
|
#include <list>
|
||||||
@ -26,7 +21,7 @@
|
|||||||
// CScheduler* s = new CScheduler();
|
// CScheduler* s = new CScheduler();
|
||||||
// s->scheduleFromNow(doSomething, std::chrono::milliseconds{11}); // Assuming a: void doSomething() { }
|
// s->scheduleFromNow(doSomething, std::chrono::milliseconds{11}); // Assuming a: void doSomething() { }
|
||||||
// s->scheduleFromNow([=] { this->func(argument); }, std::chrono::milliseconds{3});
|
// 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:
|
// ... then at program shutdown, make sure to call stop() to clean up the thread(s) running serviceQueue:
|
||||||
// s->stop();
|
// s->stop();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user