private void ReadFileMethod(string fileName, ThreadSafeFileLineQueue queue) { using (var fileStreamA = new StreamReader(File.OpenRead(fileName))) { while (!fileStreamA.EndOfStream) { queue.Enqueue(fileStreamA.ReadLine()); } queue.FinishAdding(); } }