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

FreeBSD Manual Pages

  
 
  

home | help
std::atomic...is_lock_free(3) C++ Standard Libarystd::atomic...is_lock_free(3)

NAME
       std::atomic_ref::is_lock_free - std::atomic_ref::is_lock_free

Synopsis
	  bool is_lock_free() const noexcept;  (since C++20)

	  Checks whether the atomic operations on this object are lock-free.

Parameters
	  (none)

Return value
	  true	if  the	 atomic	operations on this object are lock-free, false
       otherwise.

Notes
	  All atomic types except for std::atomic_flag may be implemented  us-
       ing mutexes or
	  other	locking	operations, rather than	using the lock-free atomic CPU
       instructions.
	  Atomic  types	 are  also  allowed to be sometimes lock-free, e.g. if
       only aligned memory
	  accesses are naturally atomic	on a  given  architecture,  misaligned
       objects of the
	  same type have to use	locks.

	  The  C++  standard  recommends (but does not require)	that lock-free
       atomic operations
	  are also address-free, that is, suitable for	communication  between
       processes using
	  shared memory.

Example
	   This	section	is incomplete
	   Reason: no example

See also
	  is_always_lock_free indicates	that the type is always	lock-free
	  [static]	      (public static member constant)

http://cppreference.com		  2022.07.31	 std::atomic...is_lock_free(3)

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

home | help