Yaturkenzhensirhiv - a handheld spy (yatur) wrote in code_wtf,
Yaturkenzhensirhiv - a handheld spy
yatur
code_wtf

Don't lambda the lambda unless the lambda lambdas you

// 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);
        }
  • Post a new comment

    Error

    Comments allowed for members only

    Anonymous comments are disabled in this journal

    default userpic

    Your IP address will be recorded 

  • 5 comments