A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://timsong-cpp.github.io/cppwp/n4659/thread.once.onceflag below:

[thread.once.onceflag]

33 Thread support library [thread] 33.4 Mutual exclusion [thread.mutex] 33.4.6 Call once [thread.once] 33.4.6.1 Struct once_­flag [thread.once.onceflag]
namespace std {
  struct once_flag {
    constexpr once_flag() noexcept;

    once_flag(const once_flag&) = delete;
    once_flag& operator=(const once_flag&) = delete;
  };
}

The class once_­flag is an opaque data structure that call_­once uses to initialize data without causing a data race or deadlock.

constexpr once_flag() noexcept;

Effects: Constructs an object of type once_­flag.

Synchronization: The construction of a once_­flag object is not synchronized.

Postconditions: The object's internal state is set to indicate to an invocation of call_­once with the object as its initial argument that no function has been called.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4