nearby: snapshot of cl/317978613

Signed-off-by: Alexey Polyudov <apolyudov@google.com>
Change-Id: I4bf367877a986910bb03e1c54aa972b4bcd59942
This commit is contained in:
Alexey Polyudov
2020-06-23 19:52:26 -07:00
parent 32828732ff
commit 6b27a508ed
164 changed files with 8663 additions and 1212 deletions
+9 -2
View File
@@ -16,8 +16,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;
};