Top "Task-parallel-library" questions

The Task Parallel Library is part of the .NET Framework since .NET 4. It is a set of APIs to enable developers to program asynchronous applications.

can not await async lambda

Consider this, Task task = new Task (async () =>{ await TaskEx.Delay(1000); }); task.Start(); task.Wait(); The call task.Wait() does …

c# task-parallel-library async-await async-ctp
Need to understand the usage of SemaphoreSlim

Here is the code I have but I don't understand what SemaphoreSlim is doing. async Task WorkerMainAsync() { SemaphoreSlim ss = new …

c# multithreading task-parallel-library semaphore
Regarding usage of Task.Start() , Task.Run() and Task.Factory.StartNew()

I just saw 3 routines regarding TPL usage which do the same job; here is the code: public static void Main() { …

c# .net async-await task-parallel-library
Is there a Task based replacement for System.Threading.Timer?

I'm new to .Net 4.0's Tasks and I wasn't able to find what I thought would be a Task based …

c# .net-4.0 timer timeout task-parallel-library
Proper way to implement a never ending task. (Timers vs Task)

So, my app needs to perform an action almost continuously (with a pause of 10 seconds or so between each run) …

c# multithreading timer task-parallel-library .net-4.5
Return Task<bool> instantly

I have a list of tasks, which i'd like to wait for. I'm waiting like await TaskEx.WhenAll(MyViewModel.GetListOfTasks().…

c# multithreading windows-phone-7 task-parallel-library
ASP.NET Web API OperationCanceledException when browser cancels the request

When a user loads a page, it makes one or more ajax requests, which hit ASP.NET Web API 2 controllers. …

asp.net iis asp.net-web-api task-parallel-library async-await
Simplest way to do a fire and forget method in c# 4.0

I really like this question: Simplest way to do a fire and forget method in C#? I just want to …

c# .net .net-4.0 task-parallel-library fire-and-forget
Proper way of handling exception in task continuewith

Please have a look at the following code- static void Main(string[] args) { // Get the task. var task = Task.Factory.…

c# .net task-parallel-library task
Delay then execute Task

Quick question, I want to wait a second before launching an async task without a return value. Is this the …

c# .net asynchronous task-parallel-library