Skip to content

Commit

Permalink
Update CallbackNotifier docs to reflect change to notify_one
Browse files Browse the repository at this point in the history
  • Loading branch information
pentschev committed Dec 5, 2023
1 parent 13c79b3 commit 54414d1
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions cpp/include/ucxx/utils/callback_notifier.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ class CallbackNotifier {
* @brief Construct a thread-safe notification object
*
* Construct a thread-safe notification object which can signal
* release of some shared state with `set()` while other threads
* block on `wait()` until the shared state is released.
* release of some shared state with `set()` while a single thread
* blocks on `wait()` until the shared state is released.
*
* If libc is glibc and the version is older than 2.25, the
* implementation uses a spinlock otherwise it uses a condition
* variable.
*
* When C++-20 is the minimum supported version, it should use
* atomic.wait + notify_all.
* atomic.wait + notify_one.
*/
CallbackNotifier() : _flag{false} {};

Expand All @@ -42,8 +42,8 @@ class CallbackNotifier {
/**
* @brief Notify waiting threads that we are done and they can proceed
*
* Set the flag to true and notify others threads blocked by a call to `wait()`.
* See also `std::condition_variable::notify_all`.
* Set the flag to true and notify a single thread blocked by a call to `wait()`.
* See also `std::condition_variable::notify_one`.
*/
void set();

Expand Down

0 comments on commit 54414d1

Please sign in to comment.