# Class ChannelPool (4.10.0)

<button class="button button-with-icon cloud-select-dropdown__button " aria-haspopup="true">Version latest</button>

- [4.10.0 (latest)](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ChannelPool)
- [4.8.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.8.0/Google.Api.Gax.Grpc.ChannelPool)
- [4.4.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.4.0/Google.Api.Gax.Grpc.ChannelPool)
- [4.3.1](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.3.1/Google.Api.Gax.Grpc.ChannelPool)
- [4.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.2.0/Google.Api.Gax.Grpc.ChannelPool)
- [4.0.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/4.0.0/Google.Api.Gax.Grpc.ChannelPool)
- [3.2.0](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/3.2.0/Google.Api.Gax.Grpc.ChannelPool)

    public sealed class ChannelPool

A pool of channels for the same service, but with potentially different endpoints. Each endpoint
has a single channel. All channels created by this pool use default application credentials.
This class is thread-safe.

## Inheritance

[object](https://learn.microsoft.com/dotnet/api/system.object) \> ChannelPool

## Inherited Members

[object.Equals(object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object)) [object.Equals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.equals#system-object-equals(system-object-system-object)) [object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) [object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) [object.ReferenceEquals(object, object)](https://learn.microsoft.com/dotnet/api/system.object.referenceequals) [object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)

## Namespace

[Google.Api.Gax.Grpc](https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc)

## Assembly

Google.Api.Gax.Grpc.dll

## Constructors

### ChannelPool(ServiceMetadata)

    public ChannelPool(ServiceMetadata serviceMetadata)

Creates a channel pool which will use the given service metadata to determine scopes and the use of self-signed JWTs.

| **Parameter** ||
|---|---|
| **Name** | **Description** |
| `serviceMetadata` | `https://docs.cloud.google.com/dotnet/docs/reference/Google.Api.Gax/latest/Google.Api.Gax.Grpc.ServiceMetadata` The metadata for the service that this pool will be used with. Must not be null. |

## Methods

### ShutdownChannelsAsync()

    public Task ShutdownChannelsAsync()

Shuts down all the currently-allocated channels asynchronously. This does not prevent the channel
pool from being used later on, but the currently-allocated channels will not be reused.

| **Returns** ||
|---|---|
| **Type** | **Description** |
| `https://learn.microsoft.com/dotnet/api/system.threading.tasks.task` | A task which will complete when all the (current) channels have been shut down. |