Channel.CreateBounded Method
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.
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. |
- Source:
- Channel.cs
- 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
.NET 9 およびその他のバージョン
製品 | バージョン |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
- Source:
- Channel.cs
- 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
.NET 9 およびその他のバージョン
製品 | バージョン |
---|---|
.NET | Core 3.0, Core 3.1, 5, 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
- Source:
- Channel.cs
- 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 9 およびその他のバージョン
製品 | バージョン |
---|---|
.NET | 6, 7, 8 (package-provided), 8, 9 (package-provided), 9 |
.NET Framework | 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided) |
.NET Standard | 2.0 (package-provided), 2.1 (package-provided) |
.NET に関するフィードバック
.NET はオープンソース プロジェクトです。 フィードバックを提供するにはリンクを選択します。