mirror of
https://github.com/urbit/shrub.git
synced 2024-12-20 17:32:11 +03:00
80 cols + order of operations
This commit is contained in:
parent
6d2b94ac7b
commit
3ed4683f4b
@ -152,13 +152,15 @@ pier pierPath mPort (serf, log, ss) = do
|
|||||||
let ship = who (Log.identity log)
|
let ship = who (Log.identity log)
|
||||||
|
|
||||||
let (bootEvents, startDrivers) =
|
let (bootEvents, startDrivers) =
|
||||||
drivers pierPath inst ship mPort (writeTQueue computeQ) shutdownEvent terminalSystem
|
drivers pierPath inst ship mPort (writeTQueue computeQ)
|
||||||
|
shutdownEvent terminalSystem
|
||||||
|
|
||||||
io $ atomically $ for_ bootEvents (writeTQueue computeQ)
|
io $ atomically $ for_ bootEvents (writeTQueue computeQ)
|
||||||
|
|
||||||
tExe <- startDrivers >>= router (readTQueue executeQ)
|
tExe <- startDrivers >>= router (readTQueue executeQ)
|
||||||
tDisk <- runPersist log persistQ (writeTQueue executeQ)
|
tDisk <- runPersist log persistQ (writeTQueue executeQ)
|
||||||
tCpu <- runCompute serf ss (readTQueue computeQ) (takeTMVar saveM) (takeTMVar shutdownM) (writeTQueue persistQ)
|
tCpu <- runCompute serf ss (readTQueue computeQ) (takeTMVar saveM)
|
||||||
|
(takeTMVar shutdownM) (writeTQueue persistQ)
|
||||||
|
|
||||||
tSaveSignal <- saveSignalThread saveM
|
tSaveSignal <- saveSignalThread saveM
|
||||||
|
|
||||||
@ -287,9 +289,9 @@ runCompute serf ss getEvent getSaveSignal getShutdownSignal putResult =
|
|||||||
go :: SerfState -> RIO e ()
|
go :: SerfState -> RIO e ()
|
||||||
go ss = do
|
go ss = do
|
||||||
cr <- atomically $
|
cr <- atomically $
|
||||||
CREvent <$> getEvent <|>
|
CRShutdown <$> getShutdownSignal <|>
|
||||||
CRSave <$> getSaveSignal <|>
|
CRSave <$> getSaveSignal <|>
|
||||||
CRShutdown <$> getShutdownSignal
|
CREvent <$> getEvent
|
||||||
case cr of
|
case cr of
|
||||||
CREvent ev -> do
|
CREvent ev -> do
|
||||||
logEvent ev
|
logEvent ev
|
||||||
|
Loading…
Reference in New Issue
Block a user