18#ifndef _DECAF_UTIL_CONCURRENT_ATOMIC_ATOMICBOOLEAN_H_
19#define _DECAF_UTIL_CONCURRENT_ATOMIC_ATOMICBOOLEAN_H_
41 AtomicBoolean(
const AtomicBoolean&);
42 AtomicBoolean& operator= (
const AtomicBoolean&);
64 return value == 0 ? false :
true;
71 void set(
bool newValue) {
72 this->value = newValue ? 1 : 0;
bool getAndSet(bool newValue)
Atomically sets to the given value and returns the previous value.
bool get() const
Gets the current value of this AtomicBoolean.
Definition AtomicBoolean.h:63
AtomicBoolean()
Creates a new AtomicBoolean whose initial value is false.
void set(bool newValue)
Unconditionally sets to the given value.
Definition AtomicBoolean.h:71
virtual ~AtomicBoolean()
Definition AtomicBoolean.h:57
std::string toString() const
Returns the String representation of the current value.
AtomicBoolean(bool initialValue)
Creates a new AtomicBoolean with the initial value.
bool compareAndSet(bool expect, bool update)
Atomically sets the value to the given updated value if the current value == the expected value.
#define DECAF_API
Definition Config.h:29
Definition AtomicBoolean.h:27
Definition AbstractExecutorService.h:28
Definition AbstractCollection.h:33
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition AprPool.h:25