The problem seems to occur under specific conditions. One such set of conditions includes:
Under these specific conditions, threads are not dispatched for a very long time - i.e. on the order of minutes.
Different methods I have tried include using QueueUserWorkItem:
ThreadPool.QueueUserWorkItem ( LoadFile );
Task t = Task.Run( () => this.LoadFile( ) ); t.Wait ( );
With both the above, the time between calling the thread and actually entering the LoadFile method can take on the order of minutes.
Do you know why this can happen and is there a way to ensure faster dispatching?