mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-12-16 02:22:12 +03:00
Re-enable local terminal (non-daemon mode) + cancelWait cleanup.
This commit is contained in:
parent
b1a9dff197
commit
d3d42a7fdd
@ -136,10 +136,7 @@ resumed top flags = do
|
||||
-- Run Pier --------------------------------------------------------------------
|
||||
|
||||
acquireWorker :: RIO e () -> RAcquire e (Async ())
|
||||
acquireWorker act = mkRAcquire start stop
|
||||
where
|
||||
stop t = cancel t >> void (waitCatch t)
|
||||
start = async act
|
||||
acquireWorker act = mkRAcquire (async act) cancel
|
||||
|
||||
pier :: ∀e. HasLogFunc e
|
||||
=> FilePath
|
||||
@ -163,7 +160,7 @@ pier pierPath mPort (serf, log, ss) = do
|
||||
|
||||
(demux, muxed) <- atomically $ do
|
||||
res <- Term.mkDemux
|
||||
-- Term.addDemux local res
|
||||
Term.addDemux local res
|
||||
pure (res, Term.useDemux res)
|
||||
|
||||
rio $ logInfo $ display $
|
||||
@ -380,11 +377,8 @@ runPersist :: EventLog
|
||||
-> (FX -> STM ())
|
||||
-> RAcquire e (Async ())
|
||||
runPersist log inpQ out =
|
||||
mkRAcquire runThread cancelWait
|
||||
mkRAcquire runThread cancel
|
||||
where
|
||||
cancelWait :: Async () -> RIO e ()
|
||||
cancelWait tid = cancel tid >> wait tid
|
||||
|
||||
runThread :: RIO e (Async ())
|
||||
runThread = asyncBound $ forever $ do
|
||||
writs <- atomically getBatchFromQueue
|
||||
|
Loading…
Reference in New Issue
Block a user