mirror of
https://github.com/kidfromjupiter/nearby.git
synced 2026-09-16 15:36:12 -04:00
roll forward to cl/317978613
Signed-off-by: Alexey Polyudov <apolyudov@google.com> Change-Id: I988b9fa534d61583b2af67dfef002fa2a5823fb7
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user