Method WriteAsync
- Namespace
- AvroSharp.Containers
- Assembly
- AvroSharp.dll
WriteAsync(T, CancellationToken)
Appends one object; when the buffered objects reach the sync interval, the block is written to the stream asynchronously. The object itself is encoded synchronously, into memory.
public ValueTask WriteAsync(T value, CancellationToken cancellationToken = default)
Parameters
valueTThe object.
cancellationTokenCancellationTokenCancels writing a block.
Returns
Remarks
If encoding the object throws, nothing of it is kept and the writer stays usable.