monad-schedule-0.1.2.0: A new, simple, composable concurrency abstraction.
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Schedule.Yield

Contents

Synopsis

YieldT

type YieldT = ScheduleT () Source #

A monad for scheduling with cooperative concurrency.

yield :: Monad m => YieldT m () Source #

Let another thread wake up.

runYieldT :: Monad m => YieldT m a -> m a Source #

runYieldIO :: MonadIO m => YieldT m a -> m a Source #

Run a YieldT value in a MonadIO, interpreting yields as GHC concurrency yields.