| Safe Haskell | None |
|---|---|
| Language | Haskell98 |
System.Prefork.Settings
- defaultSettings :: PreforkSettings sc
- relaunchSettings :: (Ord w, Eq w) => PreforkResource w -> (PreforkResource w -> IO (Maybe sc)) -> (w -> IO ProcessID) -> PreforkSettings sc
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.