ThreadSchedule
3.0.0
Modern C++ thread management library
Loading...
Searching...
No Matches
polling_wait.hpp
Go to the documentation of this file.
1
#pragma once
2
7
#include <chrono>
8
#include <condition_variable>
9
10
namespace
threadschedule::detail
11
{
12
13
template
<
unsigned
IntervalMs = 10>
14
struct
polling_wait
15
{
16
template
<
typename
Lock,
typename
Pred>
17
static
auto
18
wait
(std::condition_variable& cv, Lock& lock, Pred pred) ->
bool
19
{
20
return
cv.wait_for(lock, std::chrono::milliseconds(IntervalMs), pred);
21
}
22
};
23
24
}
// namespace threadschedule::detail
threadschedule::detail
Aggregates multiple thread_registry_backend instances into a single queryable view.
Definition
native_thread.hpp:20
threadschedule::detail::polling_wait
Definition
polling_wait.hpp:15
threadschedule::detail::polling_wait::wait
static auto wait(std::condition_variable &cv, Lock &lock, Pred pred) -> bool
Definition
polling_wait.hpp:18
include
threadschedule
detail
pool
polling_wait.hpp
Generated by
1.9.8