danielfm / pybreaker

Python implementation of the Circuit Breaker pattern.
BSD 3-Clause "New" or "Revised" License
512 stars 74 forks source link

adds support to generators #2

Closed mauriciosl closed 10 years ago

mauriciosl commented 10 years ago

This pull request will add support to monitor generators, this was needed to make it work with tornado, which has generator based coroutines for asynchronous operations. It will check if the returning type is a generator, and them wraps the generator into a iteration untill it raises StopIteration as a success, or a Exception as an error.