search

In this post, you can learn how a small change in the ASP.NET Core 3.0 WebHost makes it easier to run asynchronous tasks on app startup using IHostedService.

Bharat Dwarkani shared on Sep 21, 2019
image
andrewlock.net
bookmarks
share
favorite_border0 visibility12
favorite_border0 visibility12 share bookmarks

Task is the original and most well known API, since it shipped with the TPL, but it means that an object allocation is necessary even for scenarios where it turns out that it was already available, i.e. awaiter.IsCompleted returned true. The ValueTask value-type (struct) acts as a hybrid result that can represent an already completed result without allocating or an incomplete pending operation.

Bharat Dwarkani shared on Aug 30, 2019
image
blog.marcgravell.com
bookmarks
share
favorite_border0 visibility20
favorite_border0 visibility20 share bookmarks

A very common thing to first try out when you encounter asynchronous principles in .NET is to simply mark your method with the async keyword.

Bharat Dwarkani shared on Aug 26, 2019
image
kudchikarsk.com
bookmarks
share
favorite_border0 visibility56
favorite_border0 visibility56 share bookmarks
add