| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
Polysemy.Conc.Effect.Race
Description
Documentation
data Race :: Effect where Source #
Abstract the concept of running two programs concurrently, aborting the other when one terminates.
Timeout is a simpler variant, where one thread just sleeps for a given interval.
Constructors
| Race :: m a -> m b -> Race m (Either a b) | Run both programs concurrently, returning the result of the faster one. |
| Timeout :: TimeUnit u => m a -> u -> m b -> Race m (Either a b) | Run the fallback action if the given program doesn't finish within the specified interval. |
Instances
| type DefiningModule Race Source # | |
Defined in Polysemy.Conc.Effect.Race | |