SamSaffron / MiniProfiler

A simple but effective mini-profiler for ASP.NET MVC, ASP.NET and Ruby.
http://miniprofiler.com
1.05k stars 221 forks source link

Should implementations of IStorage be thread-safe? #182

Open TheCloudlessSky opened 11 years ago

TheCloudlessSky commented 11 years ago

I'm writing a Redis-based IStorage provider (using ServiceStack.Redis) and am running into some funky situations where the Redis client's state becomes inconsistent. I am creating the Redis client using a factory function that queries the IoC container. I was wondering if we need to ensure that the IStorage implementations need to be thread-safe? As soon as I added locks around the Redis client operations, the inconsistencies stopped.