public async Task GlobalCleanupAsync() { await ChannelPool .ShutdownAsync() .ConfigureAwait(false); await ConnectionPool .ShutdownAsync() .ConfigureAwait(false); }
public async ValueTask ShutdownAsync(bool immediately) { await _serviceLock.WaitAsync().ConfigureAwait(false); try { await Publisher .StopAutoPublishAsync(immediately) .ConfigureAwait(false); await StopAllConsumers(immediately) .ConfigureAwait(false); await ChannelPool .ShutdownAsync() .ConfigureAwait(false); } finally { _serviceLock.Release(); } }
private static async Task ShutdownAsync() { await channelPool.ShutdownAsync(); }