Roll forward to cl/338482889

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: Ic2bdb234e89f3c5860d1b483dd4bce689f13d057
This commit is contained in:
Alexey Polyudov
2020-10-22 11:30:33 -07:00
parent 13f8fddfde
commit ce4807935e
564 changed files with 13720 additions and 48704 deletions
+8 -5
View File
@@ -17,18 +17,21 @@
namespace location {
namespace nearby {
namespace api {
// A boolean value that may be updated atomically.
//
// https://docs.oracle.com/javase/7/docs/api/java/util/concurrent/atomic/AtomicBoolean.html
class AtomicBoolean {
public:
virtual ~AtomicBoolean() {}
virtual ~AtomicBoolean() = default;
virtual bool get() = 0;
virtual void set(bool value) = 0;
// Atomically read and return current value.
virtual bool Get() const = 0;
// Atomically exchange original value with a new one. Return previous value.
virtual bool Set(bool value) = 0;
};
} // namespace api
} // namespace nearby
} // namespace location