39 #ifndef QWAITCONDITION_P_H
40 #define QWAITCONDITION_P_H
54 #include <QtCore/QWaitCondition>
55 #include <QtCore/QMutex>
56 #include <QtCore/QDeadlineTimer>
58 #include <condition_variable>
64 #if __has_include(<shared_mutex>)
65 # include <shared_mutex>
72 #if !defined(__cpp_lib_shared_timed_mutex)
75 class condition_variable;
100 template <
class Predicate>
107 template <
typename Rep,
typename Period>
109 const std::chrono::duration<Rep, Period> &
d)
115 template <
typename Rep,
typename Period,
typename Predicate>
117 const std::chrono::duration<Rep, Period> &
d,
Predicate p)
127 template <
typename Clock,
typename Duration>
129 const std::chrono::time_point<Clock, Duration> &
t)
136 template <
typename Clock,
typename Duration,
typename Predicate>
138 const std::chrono::time_point<Clock, Duration> &
t,
Predicate p)
153 using condition_variable = std::condition_variable;
The QDeadlineTimer class marks a deadline in the future.
The QMutex class provides access serialization between threads.
bool tryLock(int timeout=0) noexcept
bool wait(QMutex *, QDeadlineTimer=QDeadlineTimer(QDeadlineTimer::Forever))
bool wait_until(std::unique_lock< QtPrivate::mutex > &lock, const std::chrono::time_point< Clock, Duration > &t, Predicate p)
cv_status wait_for(std::unique_lock< QtPrivate::mutex > &lock, const std::chrono::duration< Rep, Period > &d)
bool wait_for(std::unique_lock< QtPrivate::mutex > &lock, const std::chrono::duration< Rep, Period > &d, Predicate p)
cv_status wait_until(std::unique_lock< QtPrivate::mutex > &lock, const std::chrono::time_point< Clock, Duration > &t)
void wait(std::unique_lock< QtPrivate::mutex > &lock, Predicate p)
void wait(std::unique_lock< QtPrivate::mutex > &lock)
Generic::PredicateMatcher< T > Predicate(std::function< bool(T const &)> const &predicate, std::string const &description="")
GLbitfield GLuint64 timeout
[4]