This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
globalMonitor :: Process () | |
globalMonitor = do | |
let initState = [] :: [MxEvent] | |
void $ mxAgent (MxAgentId "lifecycle-listener-agent") initState [ | |
mxSink $ \ev -> do | |
let act = | |
case ev of | |
(MxProcessDied pid (DiedException msg)) -> liftMX $ say $ debug $ "[Error] " ++ show pid ++ " DiedException: " ++ msg | |
(MxProcessDied pid DiedDisconnect) -> liftMX $ say $ show pid ++ " DiedDisconnect" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
module Main where | |
import Control.Lens | |
declareFields [d| |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
module Control.Distributed.Process.Lifted | |
( module Control.Distributed.Process | |
, module Control.Distributed.Process.Lifted | |
) | |
where | |
import Control.Monad.Trans.Control |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Functions intended to make it easier to work with distributed-process | |
-- from the REPL. | |
module NodeProcess where | |
import Control.Distributed.Process | |
import Control.Distributed.Process.Serializable | |
import Control.Concurrent.MVar | |
import Control.Concurrent (threadDelay) |
NewerOlder