glue-core-0.4.2: Make better services and clients.

Safe HaskellNone
LanguageHaskell2010

Glue.DogpileProtection

Description

Module supporting the dogpile protection of a service, see http://en.wikipedia.org/wiki/Cache_stampede.

Synopsis

Documentation

dogpileProtect Source

Arguments

:: (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.