Method ReleaseAsync
ReleaseAsync()
Releases what the source keeps open between reads, such as a stream. An upload calls it when it stops reading the source: once its chunks are sent, and when it fails or is cancelled. A later read opens what it needs again. An exception that it throws does not change how the upload goes on, and is traced as a warning (see Trace). Does nothing by default.
Declaration
public virtual ValueTask ReleaseAsync()
Returns
| Type | Description |
|---|---|
| ValueTask |
Remarks
ReadAsync(long, Memory<byte>, CancellationToken) and ReleaseAsync() are both public, so a source can read and release another source.