Add suggested nodiscards, and mention UNCANCELLABLE actors
This commit is contained in:
parent
0a1fecfc2e
commit
9d045c51e4
|
@ -231,7 +231,7 @@ public:
|
|||
KeySelector(firstGreaterOrEqual(keys.end), keys.arena()), limits, snapshot, reverse);
|
||||
}
|
||||
|
||||
Future< Standalone<VectorRef< const char*>>> getAddressesForKey (const Key& key );
|
||||
[[nodiscard]] Future<Standalone<VectorRef<const char*>>> getAddressesForKey(const Key& key);
|
||||
|
||||
void enableCheckWrites();
|
||||
void addReadConflictRange( KeyRangeRef const& keys );
|
||||
|
@ -254,7 +254,8 @@ public:
|
|||
void setOption( FDBTransactionOptions::Option option, Optional<StringRef> value = Optional<StringRef>() );
|
||||
|
||||
Version getCommittedVersion() { return committedVersion; } // May be called only after commit() returns success
|
||||
Future<Standalone<StringRef>> getVersionstamp(); // Will be fulfilled only after commit() returns success
|
||||
[[nodiscard]] Future<Standalone<StringRef>>
|
||||
getVersionstamp(); // Will be fulfilled only after commit() returns success
|
||||
|
||||
Promise<Standalone<StringRef>> versionstampPromise;
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ public:
|
|||
KeySelector( firstGreaterOrEqual(keys.end), keys.arena() ), limits, snapshot, reverse );
|
||||
}
|
||||
|
||||
Future< Standalone<VectorRef<const char*>> > getAddressesForKey(const Key& key);
|
||||
[[nodiscard]] Future<Standalone<VectorRef<const char*>>> getAddressesForKey(const Key& key);
|
||||
|
||||
void addReadConflictRange( KeyRangeRef const& keys );
|
||||
void makeSelfConflicting() { tr.makeSelfConflicting(); }
|
||||
|
@ -99,7 +99,7 @@ public:
|
|||
[[nodiscard]] Future<Void> commit();
|
||||
Version getCommittedVersion() { return tr.getCommittedVersion(); }
|
||||
int64_t getApproximateSize() { return approximateSize; }
|
||||
Future<Standalone<StringRef>> getVersionstamp();
|
||||
[[nodiscard]] Future<Standalone<StringRef>> getVersionstamp();
|
||||
|
||||
void setOption( FDBTransactionOptions::Option option, Optional<StringRef> value = Optional<StringRef>() );
|
||||
|
||||
|
|
|
@ -429,6 +429,7 @@ In this example, the `PromiseStream `is actually a way for the actor to return d
|
|||
operation that it ongoing.
|
||||
|
||||
By default it is a compiler error to discard the result of a cancellable actor. If you don't think this is appropriate for your actor you can use the `[[flow_allow_discard]]` attribute.
|
||||
This does not apply to UNCANCELLABLE actors.
|
||||
|
||||
## “gotchas”
|
||||
|
||||
|
|
Loading…
Reference in New Issue