You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** Wait for condition to be signaled within given time frame.
113
113
*
114
114
* This method atomically release mutex and cause the calling thread to block; atomically here means "atomically with respect to
115
115
* access by another thread to the mutex and then the condition variable". Call notify_one or notify_all to signal the condition.
116
116
*
117
117
* Upon successful return, the mutex has been locked and is owned by the calling thread.
118
118
*
119
-
* If this method is called with millis < 0 then the timeout time is not recalculated. This make it possible to handle spurious
119
+
* If this method is called with millis < 0 then the timeout time is not recalculated. This make it possible to handle spurious
120
120
* unblocking of condition variable without the need of a lambda expression. The call sequence is then: while(! check_condition() && wait_for(lck, 200) == no_tiemout );
121
121
*
122
122
* @param mtx ralated mutex, which must be locked by the current thread.
@@ -131,7 +131,7 @@ namespace pthread {
131
131
/** @see #wait_for (mutex &, int)
132
132
*/
133
133
cv_status wait_for (lock_guard<pthread::mutex> &lck, int millis );
134
-
134
+
135
135
/** Wait for condition to be signaled within a given time frame.
136
136
*
137
137
* This method atomically release mutex and cause the calling thread to block; atomically here means "atomically with respect to
@@ -150,7 +150,7 @@ namespace pthread {
150
150
* @see notify_all
151
151
*/
152
152
template<classLambda> boolwait_for( mutex &mtx, int millis, Lambda lambda);
153
-
153
+
154
154
/** Wait for condition to be signaled within a given time frame.
155
155
*
156
156
* This method atomically release mutex and cause the calling thread to block; atomically here means "atomically with respect to
@@ -169,7 +169,7 @@ namespace pthread {
169
169
* @see notify_all
170
170
*/
171
171
template<classLambda> boolwait_for( lock_guard<pthread::mutex> &lck, int millis, Lambda lambda);
172
-
172
+
173
173
/** Signal one waiting thread.
174
174
*
175
175
* The call unblocks at least one of the threads that are blocked on the specified condition variable cond (if any threads are blocked on cond).
@@ -179,7 +179,7 @@ namespace pthread {
179
179
#else
180
180
voidnotify_one () noexcept;
181
181
#endif
182
-
182
+
183
183
/** Signal all waiting threads.
184
184
*
185
185
* The call unblocks all threads currently blocked on the specified condition variable cond.
throwcondition_variable_exception("The value specified by abstime is invalid.", rc); // NOSONAR we use throw instead of return.
246
246
break;
247
-
247
+
248
248
case EPERM:
249
249
throwcondition_variable_exception("The mutex was not owned by the current thread at the time of the call.", rc); // NOSONAR we use throw instead of return.
0 commit comments