AdoptAsync
method in Coherence.Toolkit.ICoherenceSync
Methods
Task<AdoptResult> AdoptAsync(CancellationToken cancellationToken = default)
Asynchronously requests authority over an orphaned entity.
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | Token that can be used to cancel the adoption request. |
Returns
| Type | Description |
|---|---|
| Task<AdoptResult> | Task representing the asynchronous adoption operation. |
Remarks
Cancelling cancellationToken (or destroying the entity) completes the returned
task with Canceled. This only stops awaiting the result; it does not
recall an adoption request that has already been sent, so the entity may still end up adopted. The
request is only prevented from being sent if the token is already cancelled when this method is called.