RunQueries  (C#)
Leetness: 0  

private void RunQueries()
{
    this.DisableSearch();
    Task.Factory.StartNew(() =>
    {
        this.BeginTiming();
        foreach (var query in this.CarQueries)
        {
            if (this.searchOperation.Token.IsCancellationRequested)
            {
                return;
            }
 
            query.Run(this.cars, true);
        };
        this.EndSequentialTiming();
    }, this.searchOperation.Token).ContinueWith(_ => this.EnableSearch());
}

     
Submitted on September 18, 2013 by Anonymous