mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Format include/base comments for Doxygen (see issue #3384)
This commit is contained in:
@ -49,9 +49,11 @@
|
||||
|
||||
namespace base {
|
||||
|
||||
// A flag that can safely be set from one thread and read from other threads.
|
||||
//
|
||||
// This class IS NOT intended for synchronization between threads.
|
||||
///
|
||||
/// A flag that can safely be set from one thread and read from other threads.
|
||||
///
|
||||
/// This class IS NOT intended for synchronization between threads.
|
||||
///
|
||||
class AtomicFlag {
|
||||
public:
|
||||
AtomicFlag();
|
||||
@ -61,19 +63,26 @@ class AtomicFlag {
|
||||
|
||||
~AtomicFlag();
|
||||
|
||||
// Set the flag. Must always be called from the same thread.
|
||||
///
|
||||
/// Set the flag. Must always be called from the same thread.
|
||||
///
|
||||
void Set();
|
||||
|
||||
// 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.
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
bool IsSet() const {
|
||||
// Inline here: this has a measurable performance impact on base::WeakPtr.
|
||||
return flag_.load(std::memory_order_acquire) != 0;
|
||||
}
|
||||
|
||||
// Resets the flag. Be careful when using this: callers might not expect
|
||||
// IsSet() to return false after returning true once.
|
||||
///
|
||||
/// Resets the flag. Be careful when using this: callers might not expect
|
||||
/// IsSet() to return false after returning true once.
|
||||
///
|
||||
void UnsafeResetForTesting();
|
||||
|
||||
private:
|
||||
|
Reference in New Issue
Block a user