fabfuel / circuitbreaker

Python "Circuit Breaker" implementation
Other
451 stars 51 forks source link

Thread safe? #61

Open samyakag opened 6 months ago

samyakag commented 6 months ago

I want to use the circuit breaker in a multi threaded setting where each thread is making an API call. I wanted to know will it be thread safe as I don't see usage of any locks in the code.

redhead commented 1 month ago

I am also curious. From what I can see there is no locking, hence no thread-safety.

It's a shame that this library doesn't use locks at all, and the main competition (pybreaker) uses locks too much (even on the protected call itself making the calls serialized).