roll forward to cl/317978613

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I988b9fa534d61583b2af67dfef002fa2a5823fb7
This commit is contained in:
Alexey Polyudov
2020-06-24 11:09:47 -07:00
parent 3ad06626f7
commit 7a316cc917
150 changed files with 9341 additions and 1306 deletions
+9 -2
View File
@@ -30,8 +30,15 @@ class SettableFuture : public ListenableFuture<T> {
public:
~SettableFuture() override = default;
virtual bool Set(const T& value) = 0;
virtual bool Set(T&& value) = 0;
// Completes the future successfully. The value is returned to any waiters.
// Returns true, if value was set.
// Returns false, if Future is already in "done" state.
virtual bool Set(T value) = 0;
// Completes the future unsuccessfully. The exception value is returned to any
// waiters.
// Returns true, if exception was set.
// Returns false, if Future is already in "done" state.
virtual bool SetException(Exception exception) = 0;
};