Ejemplo n.º 1
0
        /// <inheritdoc/>
        public void Dispose()
        {
            DistributionServices.LogStatistics(m_loggingContext);

            m_masterServer.Dispose();

            if (m_remoteWorkers != null)
            {
                // Finish and dispose all workers
                Task.WaitAll(m_remoteWorkers.Select(static w => w.FinishAsync(null).ContinueWith(_ => w.Dispose())).ToArray());
Ejemplo n.º 2
0
        /// <inheritdoc/>
        public void Dispose()
        {
            DistributionServices.LogStatistics(m_loggingContext);

            m_masterServer.Dispose();

            // Consider switching to `IAsyncDisposable.DisposeAsync` in this code to avoid blocking calls in Dispose method.
            if (m_remoteWorkers != null)
            {
                // Finish and dispose all workers
                var tasks = m_remoteWorkers
                            .Select(
Ejemplo n.º 3
0
        /// <inheritdoc/>
        public void Dispose()
        {
            DistributionServices.LogStatistics(m_loggingContext);

            m_masterServer.Dispose();

            if (m_remoteWorkers != null)
            {
                foreach (Worker worker in m_remoteWorkers)
                {
                    worker.Dispose();
                }
            }
        }