prefork-0.0.7: A library for building a prefork-style server quickly

Safe HaskellNone
LanguageHaskell98

System.Prefork.Settings

Synopsis

Documentation

defaultSettings :: PreforkSettings sc Source

default settings for defaultMain

This just sends signals to child processes.

relaunchSettings :: (Ord w, Eq w) => PreforkResource w -> (PreforkResource w -> IO (Maybe sc)) -> (w -> IO ProcessID) -> PreforkSettings sc Source

relaunch settings

This requires PreforkResource that describes resouces used by workers. relaunchSettings takes two functions. The one is update and the other is fork. update function is used for reading server configuration (usually from a file) and update sc type. fork function is used for launching a new worker with a worker context. The worker context should be the instance of Eq and Ord classes because it will be a element type of Set.