Merge branch 'master' into release

Change-Id: I56ea2217899e92bdd9d6cb56797ac9895e194fff
This commit is contained in:
Alexey Polyudov
2020-06-24 11:01:46 -07:00
147 changed files with 8642 additions and 1214 deletions
+10 -10
View File
@@ -15,22 +15,22 @@
#ifndef PLATFORM_V2_API_ATOMIC_REFERENCE_H_
#define PLATFORM_V2_API_ATOMIC_REFERENCE_H_
#include <cstdint>
namespace location {
namespace nearby {
namespace api {
// An object reference that may be updated atomically.
//
// https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/atomic/AtomicReference.html
template <typename T>
class AtomicReference {
// Type that allows 32-bit atomic reads and writes.
class AtomicUint32 {
public:
virtual ~AtomicReference() = default;
virtual ~AtomicUint32() = default;
virtual T Get() const & = 0;
virtual T Get() && = 0;
virtual void Set(const T& value) = 0;
virtual void Set(T&& value) = 0;
// Atomically reads and returns stored value.
virtual std::uint32_t Get() const = 0;
// Atomically stores value.
virtual void Set(std::uint32_t value) = 0;
};
} // namespace api