I have the following code:
CancellationTokenSource cancelSource = new CancellationTokenSource();
_cancelTokenList.Add(cancelSource);
CancellationToken token = cancelSource.Token;
Task.Factory.StartNew(() =>
{
StartTest(token);
}, token);
Will an exception get thrown if no threads are available to service the request for a new task, or will it just wait until a thread becomes available? If it waits, how long will it wait?
From MSDN:
It will waits until one is available, or your application exits.