Don't lambda the lambda unless the lambda lambdas you

Apr 04, 2014 16:15



// C#, .NET Framework 4.0 (or 4.5, with the same result)

private void ExecuteOnWorkerThread(Action action)
{
Task.Factory.StartNew(()=>action, CancellationToken.None, TaskCreationOptions.PreferFairness, TaskScheduler.Default);
}
Previous post Next post
Up