Polly.Net40Async 5.9.0

Prefix Reserved
Suggested Alternatives


Additional Details

This package is no longer maintained. Please use either Polly or Polly.Core.

dotnet add package Polly.Net40Async --version 5.9.0                
NuGet\Install-Package Polly.Net40Async -Version 5.9.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="Polly.Net40Async" Version="5.9.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Polly.Net40Async --version 5.9.0                
#r "nuget: Polly.Net40Async, 5.9.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 Polly.Net40Async as a Cake Addin
#addin nuget:?package=Polly.Net40Async&version=5.9.0

// Install Polly.Net40Async as a Cake Tool
#tool nuget:?package=Polly.Net40Async&version=5.9.0                

Polly.Net40Async is a version of the Polly library for .NET 4.0 with async support via Microsoft.Bcl.Async.  Polly allows developers to express resilience policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.

Product Compatible and additional computed target framework versions.
.NET Framework net40 is compatible.  net403 was computed.  net45 was computed.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on Polly.Net40Async:

Package Downloads

Polly.Caching.MemoryCache is a plug-in for the .NET OSS resilience library Polly, supporting System.Runtime.Caching.MemoryCache as a provider for Polly's CachePolicy.


通过简单、安全的接口使用 Authing 提供的功能。


Basic implementation and utilities for Cosmos SDKs

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
5.9.0 45,271 4/9/2018
5.8.0 8,464 1/31/2018
5.7.0 2,706 1/6/2018
5.6.1 2,270 11/29/2017
5.6.0 1,026 11/27/2017
5.5.0 1,705 11/3/2017
5.4.0 1,007 11/1/2017
5.3.1 67,626 8/6/2017
5.3.0 1,032 7/27/2017
5.2.0 5,071 6/28/2017
5.1.1-v5-x-cachealpha0001 849 6/2/2017
5.1.0 2,715 5/4/2017
5.0.6 306,573 2/11/2017
5.0.5 1,065 2/4/2017
5.0.4-pre 2,178 1/17/2017
5.0.3 1,072 1/6/2017
5.0.2-v5-0-alpha0001 941 11/22/2016
5.0.1-v5-0-alpha0001 913 10/25/2016
4.3.0 26,484 6/30/2016
4.2.4 2,034 6/17/2016
4.2.3 1,387 6/7/2016
4.2.2 1,490 6/2/2016

v5.0 is a major release with significant new resilience policies: Timeout; Bulkhead Isolation; Fallback; Cache; and PolicyWrap.  See release notes back to v5.0.0 for full details.

    - Allow Timeout.InfiniteTimeSpan (no timeout) for TimeoutPolicy.
    - Add .AsPolicy<TResult> and .AsAsyncPolicy<TResult> methods for converting non-generic policies to generic policies.
    - Per Semver, indicates deprecation of overloads and properties intended to be removed or renamed in Polly v6.
    - Add a new onBreak overload that provides the prior state on a transition to an open state
    - Bug fix: RelativeTtl in CachePolicy now always returns a ttl relative to time item is cached
    - Minor cache fixes
    - Add ability to calculate cache Ttl based on item to cache
    - Allow user-created custom policies

    - Extend PolicyWrap syntax with interfaces

    - Add ability to handle inner exceptions natively: .HandleInner<TEx>()
    - Allow WaitAndRetry policies to calculate wait based on the handled fault
    - Add the ability to access the policies within an IPolicyWrap
    - Allow PolicyWrap to take interfaces as parameters
    - Bug fix: set context keys for generic execute method with PolicyWrap
    - Bug fix: generic TResult method with non-generic fallback policy
    - Performance improvements

    - Bug fix: non-generic CachePolicy with PolicyWrap
    - Add Cache interfaces

    - Add CachePolicy: cache-aside pattern, with interfaces for pluggable cache providers and serializers.
    - Bug fix: Sync TimeoutPolicy in pessimistic mode no longer interposes AggregateException.
    - Provide public factory methods for PolicyResult, to support testing.
    - Fallback delegates can now take handled fault as input parameter.

    - Make ISyncPolicy<TResult> public
    - (Upgrade solution to msbuild15)
    - Fix ExecuteAndCapture() usage with PolicyWrap   
    - Allow Fallback delegates to take execution Context
    - Provide IReadOnlyPolicyRegistry interface

    - Add PolicyRegistry for storing and retrieving policies.
    - Add interfaces by policy type and execution type.
    - Change .NetStandard minimum support to NetStandard1.1.

    - Allow different parts of a policy execution to exchange data via a mutable Context travelling with each execution.

    - (.NETStandard1.0 changes only.)

    - Bug fix: Prevent request stampede during half-open state of CircuitBreaker and AdvancedCircuitBreaker.  Enforce only one new trial call per break duration, during half-open state.
    - Bug fix: Prevent duplicate raising of the onBreak delegate, if executions started when a circuit was closed, return faults when a circuit has already opened.
    - Optimisation: Optimise hotpaths for Circuit-Breaker, Retry and Fallback policies.
    - Add NoOpPolicy: NoOpPolicy executes delegates without intervention; for eg stubbing out Polly in unit testing.

    5.0.4 pre
    - Fix Microsoft.Bcl and Nito.AsyncEx dependencies for Polly.Net40Async.

    5.0.3 RTM
    - Refine implementation of cancellable synchronous WaitAndRetry
    - Minor breaking change: Where a user delegate does not observe cancellation, Polly will now honour the delegate's outcome rather than throw for the unobserved cancellation (issue 188).

    5.0.2 alpha
    - Add full specs support for .NET40.
    - Fix issue 179: Make Net4.0 async implementation for Bulkhead truly async.

    5.0.1 alpha
    - (Add a .NETStandard1.0 target.)

    5.0.0 alpha
    A major release, adding significant new resilience policies:
    - Timeout policy: allows timing out any execution
    - Bulkhead isolation policy: limits the resources consumable by governed actions, such that a faulting channel cannot cause cascading failures.
    - Fallback policy: provides for a fallback execution or value, in case of overall failure
    - PolicyWrap: allows flexibly combining Policy instances of any type, to form an overall resilience strategy.

    Other changes include:
    - Add PolicyKeys and context to all policy executions, for logging and to support later introduction of policy events and metrics.
    - Add CancellationToken support to synchronous executions.
    - Add some missing ExecuteAndCapture/Async overloads.
    - Remove invalid ExecuteAsync overloads taking (but not making use of) a CancellationToken
    - Provide .NET4.0 support uniquely through Polly.NET40Async package
    - Retire ContextualPolicy (not part of documented API; support now in Policy base class)
    - Discontinue .NET3.5 support

     - Added ability for policies to handle return results.  Optimised circuit-breaker hot path.  Fixed circuit-breaker threshold bug.  

     - Added overloads to WaitAndRetry and WaitAndRetryAsync methods that accept an onRetry delegate which includes the attempt count.

     - Cleaned up new Polly.Net40Async NuGet package, removing Polly.dll and unused framework folders.

     - Add new Polly.Net40Async project supporting async for .NET40 via Microsoft.Bcl.Async.  This is available as separate Nuget packages Polly.Net40Async and Polly.Net40Async-signed.