async8 1.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package async8 --version 1.0.0                
NuGet\Install-Package async8 -Version 1.0.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="async8" Version="1.0.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add async8 --version 1.0.0                
#r "nuget: async8, 1.0.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install async8 as a Cake Addin
#addin nuget:?package=async8&version=1.0.0

// Install async8 as a Cake Tool
#tool nuget:?package=async8&version=1.0.0                

Async8

A utility library for simplifying asynchronous programming in .NET.

Features

  • Task Extensions: Add timeout handling and cancellation support to async operations.
  • Concurrent Execution Helpers: Execute tasks in parallel or process items in batches.
  • Async Caching: Cache asynchronous operations for improved performance.
  • Retry Policies: Handle transient errors with configurable retries.

Basic Usage

1. Parallel Execution

Run multiple tasks concurrently with a specified degree of parallelism.

using Async8.Helpers;

var items = Enumerable.Range(1, 100);
await ConcurrentHelpers.ParallelForEachAsync(items, degreeOfParallelism: 4, async item =>
{
    await ProcessItemAsync(item);
});

2. Async Caching

Cache the results of asynchronous operations to avoid redundant computations.

using Async8.Caching;

var cache = new AsyncCache<string, string>();
var value = await cache.GetOrAddAsync("key1", async key =>
{
    return await FetchDataAsync(key);
});

3. Retry Policy

Handle transient errors by automatically retrying failed operations.

using Async8.Policies;

var result = await RetryPolicy.ExecuteWithRetryAsync(async () =>
{
    return await ExternalServiceCallAsync();
}, maxRetries: 3, delayBetweenRetries: TimeSpan.FromSeconds(2));

4. Task Timeout

Handle transient errors by automatically retrying failed operations.

using Async8.Extensions;

var result = await SomeAsyncMethod().WithTimeout(TimeSpan.FromSeconds(5));
Product Compatible and additional computed target framework versions.
.NET net5.0 is compatible.  net5.0-windows was computed.  net5.0-windows7.0 is compatible.  net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net6.0-windows7.0 is compatible.  net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net7.0-windows7.0 is compatible.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net8.0-windows7.0 is compatible.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp1.0 is compatible.  netcoreapp1.1 is compatible.  netcoreapp2.0 is compatible.  netcoreapp2.1 is compatible.  netcoreapp2.2 is compatible.  netcoreapp3.0 is compatible.  netcoreapp3.1 is compatible. 
.NET Standard netstandard1.1 is compatible.  netstandard1.2 is compatible.  netstandard1.3 is compatible.  netstandard1.4 is compatible.  netstandard1.5 is compatible.  netstandard1.6 is compatible.  netstandard2.0 is compatible.  netstandard2.1 is compatible. 
.NET Framework net45 is compatible.  net451 is compatible.  net452 is compatible.  net46 is compatible.  net461 is compatible.  net462 is compatible.  net463 was computed.  net47 is compatible.  net471 is compatible.  net472 is compatible.  net48 is compatible.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen30 was computed.  tizen40 was computed.  tizen60 was computed. 
Universal Windows Platform uap was computed.  uap10.0 was computed. 
Windows Phone wpa81 was computed. 
Windows Store netcore was computed.  netcore45 was computed.  netcore451 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETCoreApp 1.0

  • .NETCoreApp 1.1

  • .NETCoreApp 2.0

    • No dependencies.
  • .NETCoreApp 2.1

    • No dependencies.
  • .NETCoreApp 2.2

    • No dependencies.
  • .NETCoreApp 3.0

    • No dependencies.
  • .NETCoreApp 3.1

    • No dependencies.
  • .NETFramework 4.5

    • No dependencies.
  • .NETFramework 4.5.1

    • No dependencies.
  • .NETFramework 4.5.2

    • No dependencies.
  • .NETFramework 4.6

    • No dependencies.
  • .NETFramework 4.6.1

    • No dependencies.
  • .NETFramework 4.6.2

    • No dependencies.
  • .NETFramework 4.7

    • No dependencies.
  • .NETFramework 4.7.1

    • No dependencies.
  • .NETFramework 4.7.2

    • No dependencies.
  • .NETFramework 4.8

    • No dependencies.
  • .NETStandard 1.0

  • .NETStandard 1.1

  • .NETStandard 1.2

  • .NETStandard 1.3

  • .NETStandard 1.4

  • .NETStandard 1.5

  • .NETStandard 1.6

  • .NETStandard 2.0

    • No dependencies.
  • .NETStandard 2.1

    • No dependencies.
  • net5.0

    • No dependencies.
  • net5.0-windows7.0

    • No dependencies.
  • net6.0

    • No dependencies.
  • net6.0-windows7.0

    • No dependencies.
  • net7.0

    • No dependencies.
  • net7.0-windows7.0

    • No dependencies.
  • net8.0

    • No dependencies.
  • net8.0-windows7.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.1.0 76 1/7/2025
1.0.0 101 11/29/2024

Initial release of async8. This version includes foundational features such as Task extensions for error handling and timeouts, helpers for concurrent task execution, async caching mechanisms, and retry policies for transient fault handling. Future updates will focus on expanding features and improving performance.