Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
MVar Transport Instance. New items overwrite the current queued item.
Useful in subscription-like contexts where you don't care about outdated values.
This is surprisingly useful since it doesn't block sources, but also doesn't accumulate items.
WARNING: Don't use if you want to ensure that all produced items are consumed!
Synopsis
- data Latest a
- type ChurroLatest a = Churro a Latest
- runWaitLatest :: ChurroLatest a Void Void -> IO a
- runWaitListLatest :: ChurroLatest () Void o -> IO [o]
Documentation
type ChurroLatest a = Churro a Latest Source #
runWaitLatest :: ChurroLatest a Void Void -> IO a Source #
Convenience function for running a Churro with a MVar backed Latest Transport.
runWaitListLatest :: ChurroLatest () Void o -> IO [o] Source #
Convenience function for running a Churro into a List with a MVar backed Latest Transport.