Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F13711401
D6515.id21252.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
948 B
Subscribers
None
D6515.id21252.diff
View Options
diff --git a/src/test/scheduler_tests.cpp b/src/test/scheduler_tests.cpp
--- a/src/test/scheduler_tests.cpp
+++ b/src/test/scheduler_tests.cpp
@@ -5,10 +5,12 @@
#include <scheduler.h>
#include <random.h>
+#include <sync.h>
#include <boost/test/unit_test.hpp>
#include <atomic>
+#include <condition_variable>
#include <thread>
BOOST_AUTO_TEST_SUITE(scheduler_tests)
@@ -133,7 +135,7 @@
BOOST_AUTO_TEST_CASE(schedule_every) {
CScheduler scheduler;
- boost::condition_variable cvar;
+ std::condition_variable cvar;
std::atomic<int> counter{15};
std::atomic<bool> keepRunning{true};
@@ -165,8 +167,8 @@
std::thread schedulerThread(
std::bind(&CScheduler::serviceQueue, &scheduler));
- boost::mutex mutex;
- boost::unique_lock<boost::mutex> lock(mutex);
+ Mutex mutex;
+ WAIT_LOCK(mutex, lock);
while (keepRunning) {
cvar.wait(lock);
BOOST_CHECK(counter >= 0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Apr 26, 11:51 (2 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5573467
Default Alt Text
D6515.id21252.diff (948 B)
Attached To
D6515: Use std::condition_variable and sync.h instead of boost in scheduler_tests.cpp
Event Timeline
Log In to Comment