Namespaces
Variants
Views
Actions

Difference between revisions of "Template:cpp/atomic/atomic/notify one"

From cppreference.com
m (fixed link)
m (fixed link)
Line 28: Line 28:
 
===See also===
 
===See also===
 
{{dsc begin}}
 
{{dsc begin}}
{{dsc inc | cpp/atomic/{{{1|}}}/dsc wait | {{{1|}}}}}
+
{{dsc inc | cpp/atomic/atomic/dsc wait | {{{1|}}}}}
 
{{#ifeq:{{{1|}}} | atomic_flag |
 
{{#ifeq:{{{1|}}} | atomic_flag |
 
{{dsc inc | cpp/atomic/dsc atomic_flag_wait}}
 
{{dsc inc | cpp/atomic/dsc atomic_flag_wait}}

Revision as of 07:59, 17 December 2019

Template:cpp/atomic//title Template:cpp/atomic//navbar

(1) (since C++20)
void notify_one() const noexcept;
void notify_one() const volatile noexcept;

If there is an atomic operation waiting on object, then unblocks at least one such operation; otherwise does nothing.

The corresponding waiting functions are wait() and wait_explicit().

Contents

Return value

(none)

Notes

See the Notes section of std::::wait().

Example

See also

(C++20)
blocks the thread until notified and the atomic value changes
(public member function of Template:cpp/atomic//title) [edit]
blocks the thread until notified and the atomic value changes
(function template) [edit]
notifies a thread blocked in atomic_wait
(function template) [edit]