Partage via


Channel.CreateBounded Méthode

Définition

Surcharges

CreateBounded<T>(Int32)

Crée un canal avec la capacité maximale spécifiée.

CreateBounded<T>(BoundedChannelOptions)

Crée un canal avec la capacité maximale spécifiée.

CreateBounded<T>(BoundedChannelOptions, Action<T>)

Crée un canal soumis aux options fournies.

CreateBounded<T>(Int32)

Crée un canal avec la capacité maximale spécifiée.

public:
generic <typename T>
 static System::Threading::Channels::Channel<T> ^ CreateBounded(int capacity);
public static System.Threading.Channels.Channel<T> CreateBounded<T> (int capacity);
static member CreateBounded : int -> System.Threading.Channels.Channel<'T>
Public Shared Function CreateBounded(Of T) (capacity As Integer) As Channel(Of T)

Paramètres de type

T

Spécifie le type de données dans le canal.

Paramètres

capacity
Int32

Nombre maximal d'éléments que le canal peut stocker.

Retours

Channel<T>

Le canal créé.

Remarques

Les canaux créés avec cette méthode appliquent le Wait comportement et interdisent l’exécution synchrone des continuations.

S’applique à

CreateBounded<T>(BoundedChannelOptions)

Crée un canal avec la capacité maximale spécifiée.

public:
generic <typename T>
 static System::Threading::Channels::Channel<T> ^ CreateBounded(System::Threading::Channels::BoundedChannelOptions ^ options);
public static System.Threading.Channels.Channel<T> CreateBounded<T> (System.Threading.Channels.BoundedChannelOptions options);
static member CreateBounded : System.Threading.Channels.BoundedChannelOptions -> System.Threading.Channels.Channel<'T>
Public Shared Function CreateBounded(Of T) (options As BoundedChannelOptions) As Channel(Of T)

Paramètres de type

T

Spécifie le type de données dans le canal.

Paramètres

options
BoundedChannelOptions

Options qui conditionnent le comportement du canal.

Retours

Channel<T>

Le canal créé.

S’applique à

CreateBounded<T>(BoundedChannelOptions, Action<T>)

Crée un canal soumis aux options fournies.

public:
generic <typename T>
 static System::Threading::Channels::Channel<T> ^ CreateBounded(System::Threading::Channels::BoundedChannelOptions ^ options, Action<T> ^ itemDropped);
public static System.Threading.Channels.Channel<T> CreateBounded<T> (System.Threading.Channels.BoundedChannelOptions options, Action<T>? itemDropped);
static member CreateBounded : System.Threading.Channels.BoundedChannelOptions * Action<'T> -> System.Threading.Channels.Channel<'T>
Public Shared Function CreateBounded(Of T) (options As BoundedChannelOptions, itemDropped As Action(Of T)) As Channel(Of T)

Paramètres de type

T

Spécifie le type de données dans le canal.

Paramètres

options
BoundedChannelOptions

Options qui conditionnent le comportement du canal.

itemDropped
Action<T>

Délégué qui sera appelé lorsque l’élément est supprimé du canal. Consultez BoundedChannelFullMode.

Retours

Channel<T>

Le canal créé.

S’applique à