Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

ChannelWriter<T>.Complete(Exception) 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.

Mark the channel as being complete, meaning no more items will be written to it.

public void Complete(Exception? error = default);
public void Complete(Exception error = default);
member this.Complete : Exception -> unit
Public Sub Complete (Optional error As Exception = Nothing)

Parameters

error
Exception

Optional Exception indicating a failure that's causing the channel to complete.

Exceptions

The channel has already been marked as complete.

Applies to


Feedback

Was this page helpful?