Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
std::once_flag(3)	      C++ Standard Libary	     std::once_flag(3)

NAME
       std::once_flag -	std::once_flag

Synopsis
	  Defined in header <mutex>
	  class	once_flag;	     (since C++11)

	  The class std::once_flag is a	helper structure for std::call_once.

	  An object of type std::once_flag that	is passed to multiple calls to
       std::call_once
	  allows  those	calls to coordinate with each other such that only one
       of the calls
	  will actually	run to completion.

	  std::once_flag is neither copyable nor movable.

Member functions
       std::once_flag::once_flag

	  constexpr once_flag()	noexcept;

	  Constructs an	once_flag object. The internal state is	set  to	 indi-
       cate that no
	  function has been called yet.

Parameters
	  (none)

See also
	  call_once  invokes a function	only once even if called from multiple
       threads
	  (C++11)   (function template)

http://cppreference.com		  2022.07.31		     std::once_flag(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=std::once_flag&sektion=3&manpath=FreeBSD+Ports+15.0>

home | help