I have a question about using of Task.
I write the follow code:
static void Main(string[] args)
{
Task t = new Task(() => DoWork());
}
private static void DoWork()
{
//Do Something
}
DoWork
is run on thread from ThreadPool.
for the example let assume the thread num is 3.
My Question: There is option that in middle of the func DoWork, because of context switch etc', the continuous of the function will be in thread that is not 3?
Thank!