async8 1.1.0
dotnet add package async8 --version 1.1.0
NuGet\Install-Package async8 -Version 1.1.0
<PackageReference Include="async8" Version="1.1.0" />
paket add async8 --version 1.1.0
#r "nuget: async8, 1.1.0"
// Install async8 as a Cake Addin #addin nuget:?package=async8&version=1.1.0 // Install async8 as a Cake Tool #tool nuget:?package=async8&version=1.1.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 | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. 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. 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. 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. 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 is compatible. netcoreapp3.1 is compatible. |
.NET Standard | 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 | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.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 2.0
- No dependencies.
-
.NETStandard 2.1
- No dependencies.
-
net5.0
- No dependencies.
-
net6.0
- No dependencies.
-
net7.0
- No dependencies.
-
net8.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.
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.