Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
ChannelWriter<T>.WaitToWriteAsync(CancellationToken) Method
Definition
- Namespace:
- System.Threading.Channels
- Assembly:
- System.Threading.Channels.dll
- Package:
- System.Threading.Channels v11.0.0-preview.5.26302.115
- Source:
- ChannelWriter.cs
- Source:
- ChannelWriter.cs
- Source:
- ChannelWriter.cs
- Source:
- ChannelWriter.cs
- Source:
- ChannelWriter.cs
- Source:
- ChannelWriter.cs
Important
Some information relates to prerelease product that may be substantially modified before itβs released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a ValueTask<TResult> that will complete when space is available to write an item.
public abstract System.Threading.Tasks.ValueTask<bool> WaitToWriteAsync(System.Threading.CancellationToken cancellationToken = default);
abstract member WaitToWriteAsync : System.Threading.CancellationToken -> System.Threading.Tasks.ValueTask<bool>
Public MustOverride Function WaitToWriteAsync (Optional cancellationToken As CancellationToken = Nothing) As ValueTask(Of Boolean)
Parameters
- cancellationToken
- CancellationToken
A CancellationToken used to cancel the wait operation.
Returns
A ValueTask<TResult> that will complete with a true result when space is available to write an item
or with a false result when no further writing will be permitted.
Exceptions
The cancellation token was canceled. This exception is stored into the returned task.
Applies to
Feedback
Was this page helpful?
