src/ADAL.NET/StaTaskScheduler.cs
/// <summary>
/// Cleans up the scheduler by indicating that no more tasks will be queued.
/// This method blocks until all threads successfully shutdown.
/// </summary>
Cleans up the scheduler by indicating that no more tasks will be queued.
This method blocks until all threads successfully shutdown.
Cleans up the scheduler by indicating that no more tasks will be queued . This method blocks until all threads successfully shutdown .
public void Dispose()
        {
            if (_tasks != null)
            {
                _tasks.CompleteAdding();
                foreach (var thread in _threads) thread.Join();
                _tasks.Dispose();
                _tasks = null;
            }
        }
public void Dispose ( ) { if ( _tasks != null ) { _tasks . CompleteAdding ( ) ; foreach ( var thread in _threads ) thread . Join ( ) ; _tasks . Dispose ( ) ; _tasks = null ; } }
Cleans up the scheduler by indicating that no more tasks will be queued.
Cleans up the scheduler by indicating that no more tasks will be queued .
// Indicate that no new tasks will be coming in // Wait for all threads to finish processing tasks // Cleanup