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
+9 -6
View File
@@ -17,10 +17,12 @@
#include <cstdint>
#include "platform/exception.h"
#include "platform/base/exception.h"
#include "absl/time/time.h"
namespace location {
namespace nearby {
namespace api {
// A synchronization aid that allows one or more threads to wait until a set of
// operations being performed in other threads completes.
@@ -28,14 +30,15 @@ namespace nearby {
// https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/CountDownLatch.html
class CountDownLatch {
public:
virtual ~CountDownLatch() {}
virtual ~CountDownLatch() = default;
virtual Exception::Value await() = 0; // throws Exception::INTERRUPTED
virtual ExceptionOr<bool> await(
std::int32_t timeout_millis) = 0; // throws Exception::INTERRUPTED
virtual void countDown() = 0;
virtual Exception Await() = 0; // throws Exception::kInterrupted
virtual ExceptionOr<bool> Await(
absl::Duration timeout) = 0; // throws Exception::kInterrupted
virtual void CountDown() = 0;
};
} // namespace api
} // namespace nearby
} // namespace location