Home About

All posts tagged with "Task"

The .Net Task library is a convenient way to run a function in parallel. A Task is basically a promise to return a result once it is done.

Page 1 of 1

C# - When to use threads instead of tasks

I have not yet found a situation where I needed a thread instead of a Task. Threads are a lower level concept when compared to tasks. »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Task, Thread 31 October 2020

C# - How to easily create and start a new thread

It is quite easy to start a new thread in C#. All you need is to instantiate a new object of the type Thread and call »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Thread, Task 30 May 2020

C# - What is the difference between threads and tasks?

I had a discussion a couple of weeks ago about tasks and threads. It occurred to me that I had rarely used threads and mostly used »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, .Net, Task, Thread 08 November 2018

C# - How to break an async/await chain when calling something that is not asynchronous

I have sometimes found myself - at the end of a long chain of using async/await - calling something that is not using async. Sometimes »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Task, Thread 16 October 2018

C# - how to create a successfully completed tasks with a result

Tasks can be a bit of a pain when writing tests, especially when a dependency returns a task. Often it is just enough to return a »

Peter Daugaard Rasmussen Peter Daugaard Rasmussen on C#, Task 28 January 2018
Page 1 of 1
Rss
Twitter
LinkedIn
profile for Peter Rasmussen at Stack Overflow, Q&A for professional and enthusiast programmers
Peter Daugaard Rasmussen - developer, Consultant, Blogger © 2021 Cookie policy