Channel.CreateBounded Method
Definition
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.
Overloads
CreateBounded<T>(Int32) |
Creates a channel with the specified maximum capacity. |
CreateBounded<T>(BoundedChannelOptions) |
Creates a channel with the specified maximum capacity. |
CreateBounded<T>(BoundedChannelOptions, Action<T>) |
Creates a channel subject to the provided options. |
CreateBounded<T>(Int32)
- Source:
- Channel.cs
- Source:
- Channel.cs
- Source:
- Channel.cs
Creates a channel with the specified maximum capacity.
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)
Type Parameters
- T
Specifies the type of data in the channel.
Parameters
- capacity
- Int32
The maximum number of items the channel may store.
Returns
The created channel.
Remarks
Channels created with this method apply the Wait behavior and prohibit continuations from running synchronously.
Applies to
CreateBounded<T>(BoundedChannelOptions)
- Source:
- Channel.cs
- Source:
- Channel.cs
- Source:
- Channel.cs
Creates a channel with the specified maximum capacity.
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)
Type Parameters
- T
Specifies the type of data in the channel.
Parameters
- options
- BoundedChannelOptions
Options that guide the behavior of the channel.
Returns
The created channel.
Applies to
CreateBounded<T>(BoundedChannelOptions, Action<T>)
- Source:
- Channel.cs
- Source:
- Channel.cs
- Source:
- Channel.cs
Creates a channel subject to the provided options.
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)
Type Parameters
- T
Specifies the type of data in the channel.
Parameters
- options
- BoundedChannelOptions
Options that guide the behavior of the channel.
- itemDropped
- Action<T>
Delegate that will be called when item is being dropped from channel. See BoundedChannelFullMode.
Returns
The created channel.
Applies to
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示