Safe Haskell | None |
---|---|
Language | Haskell2010 |
Module supporting the dogpile protection of a service, see http://en.wikipedia.org/wiki/Cache_stampede.
- dogpileProtect :: (MonadBaseControl IO m, MonadBaseControl IO n, Eq a, Hashable a) => BasicService m a b -> n (IORef (HashMap a (ResultVar b)), BasicService m a b)
Documentation
:: (MonadBaseControl IO m, MonadBaseControl IO n, Eq a, Hashable a) | |
=> BasicService m a b | The service to protect. |
-> n (IORef (HashMap a (ResultVar b)), BasicService m a b) |
Dogpile protection of a service, to prevent multiple calls for the same value being submitted. | Loses the values held within m.