tathamoddie/reliability-patterns — pull request #1 by tozevv (2014-08-09 23:09:02+00:00)
Title: Added support for async / await usage in circuit breaker with async. 

The motivation
-------------------
The simple Circuit Breaker implementation was just what I was looking for one project I have. However I want to protect some nice async methods that do some IO and / or consume by another systems.

What
-------
Added support for async / await style execute in circuit breaker.
Added ExecuteAsync similar to Execute(Func) and their Execute(Action) ExecuteAsync(Action) counterparts.

How
------
Needed to do a simple refactor to cope with keeping async / sync versions and comply with the best practice as recommended by http://blogs.msdn.com/b/pfxteam/archive/2012/03/24/10287244.aspx.

Cloned the test scenarios to a "Async" version and added a new test for the case when multiple executions of a failing operation arrive at the same time and go through eventually exceeding the threshold and that works exactly as expected.

Requires upgrade target to c# 4.5+.