Chromium Embedded Framework (CEF)  126.2.0+g5c56e98+chromium-126.0.6478.62
base::AtomicFlag Class Reference

A flag that can safely be set from one thread and read from other threads. More...

#include "include/base/cef_atomic_flag.h"

Public Member Functions

 AtomicFlag ()
 
 AtomicFlag (const AtomicFlag &)=delete
 
AtomicFlagoperator= (const AtomicFlag &)=delete
 
 ~AtomicFlag ()
 
void Set ()
 Set the flag. More...
 
bool IsSet () const
 Returns true iff the flag was set. More...
 
void UnsafeResetForTesting ()
 Resets the flag. More...
 

Detailed Description

A flag that can safely be set from one thread and read from other threads.

This class IS NOT intended for synchronization between threads.

Constructor & Destructor Documentation

◆ AtomicFlag() [1/2]

base::AtomicFlag::AtomicFlag ( )

◆ AtomicFlag() [2/2]

base::AtomicFlag::AtomicFlag ( const AtomicFlag )
delete

◆ ~AtomicFlag()

base::AtomicFlag::~AtomicFlag ( )

Member Function Documentation

◆ IsSet()

bool base::AtomicFlag::IsSet ( ) const
inline

Returns true iff the flag was set.

If this returns true, the current thread is guaranteed to be synchronized with all memory operations on the thread which invoked Set() up until at least the first call to Set() on it.

◆ operator=()

AtomicFlag& base::AtomicFlag::operator= ( const AtomicFlag )
delete

◆ Set()

void base::AtomicFlag::Set ( )

Set the flag.

Must always be called from the same thread.

◆ UnsafeResetForTesting()

void base::AtomicFlag::UnsafeResetForTesting ( )

Resets the flag.

Be careful when using this: callers might not expect IsSet() to return false after returning true once.


The documentation for this class was generated from the following file: