Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
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.
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 first action if the second action doesn't finish within the specified interval. |
Instances
type DefiningModule Race Source # | |
Defined in Polysemy.Conc.Effect.Race |