Task.Factory.StartNew doesn't always start the task-Collection of common programming errors
I’m seeing this strange behavior where the runtime sometimes doesn’t start a task Task.Factory.StartNew when called. I am specifically going over it in the debugger, but for some reason the task does not run. This happens sporadically, sometimes the task starts and sometimes it doesn’t.
Task.Factory.StartNew(() =>
{
Extract(fileName);
}, TaskCreationOptions.LongRunning);
private static void Extract(String fileName)
{
Trace.WriteLine("Extract------------------ --------------- ---");
}