Top "Task" questions

A task is an abstraction that is used to work with concurrency, it can denote operation that should be executed concurrently with the rest of a program.

await Task.CompletedTask for what?

I created UWP app with Windows Template Studio that introduced at Build2017. Below class is a part of generated code …

c# uwp async-await task windows-10-universal
How to know if my application is in foreground or background, android?

I need to check if my application is running in background or foreground and then perform some operations relatively to …

android android-activity background task foreground
NSubstitute - mock throwing an exception in method returning Task

Using NSubstitute, how do you mock an exception being thrown in a method returning a Task? Let's say our method …

c# .net asynchronous task nsubstitute
how to restrict the concurrent running map tasks?

My hadoop version is 1.0.2. Now I want at most 10 map tasks running at the same time. I have found 2 variable …

map hadoop mapreduce task jobs
What does "long-running tasks" mean?

By default, the CLR runs tasks on pooled threads, which is ideal for short-running compute-bound work. For longer-running and blocking …

c# .net multithreading task
Gradle - How to add some delay pause hang in Gradle

Im looking for a way to insert a pause of few seconds between the calls of two gradle tasks. I …

gradle task delay sleep onpause
Relay Command can execute and a Task

i want to start a task when a relay command is called, however i want to disable the button as …

c# mvvm .net-4.0 task icommand
what is the correct way to cancel multiple tasks in c#

I have a button thats spawns 4 tasks. The same button changes to a cancel button and clicking this should cancel …

c# c#-4.0 task-parallel-library task pfx
Async/await tasks and WaitHandle

Say I have 10N items(I need to fetch them via http protocol), in the code N Tasks are started …

c# asynchronous task waithandle async-await
Difference between OperationCanceledException and TaskCanceledException?

What is the difference between OperationCanceledException and TaskCanceledException? If I am using .NET 4.5 and using the async/await keywords, which …

c# exception asynchronous task