freckle-app-1.15.2.0: Haskell application toolkit used at Freckle
Safe HaskellSafe-Inferred
LanguageHaskell2010

Freckle.App.Async

Synopsis

Documentation

async :: (MonadMask m, MonadUnliftIO m) => m a -> m (Async a) Source #

async but passing the thread context along

immortalCreate Source #

Arguments

:: (MonadMask m, MonadUnliftIO m) 
=> (Either SomeException () -> m ())

How to handle unexpected finish

-> m ()

The action to run persistently

-> m a 

Wrapper around creating Control.Immortal processes

Features:

  • Ensures the thread context is correctly passed to both your spawned action and your error handler
  • Blocks forever after spawning your thread.

immortalCreateLogged :: (MonadMask m, MonadUnliftIO m, MonadLogger m) => m () -> m a Source #

immortalCreate with logging of unexpected finishes