mirror of
https://github.com/ilyakooo0/urbit.git
synced 2024-11-29 04:04:02 +03:00
king: Use modifyTVar' instead of modifyTVar.
We mostly used modifyTVar', but there were a few lazy cases.
This commit is contained in:
parent
e7b69c9407
commit
37a52136ab
@ -138,7 +138,7 @@ ames' who isFake stderr = do
|
||||
vail <- readTVar avail
|
||||
if vail > 0
|
||||
then do
|
||||
modifyTVar avail (subtract 1)
|
||||
modifyTVar' avail (subtract 1)
|
||||
writeTQueue ventQ p
|
||||
pure Intake
|
||||
else do
|
||||
|
@ -191,7 +191,7 @@ clay env plan =
|
||||
atomically $ plan (EvErr syncEv syncFailed)
|
||||
|
||||
|
||||
atomically $ modifyTVar
|
||||
atomically $ modifyTVar'
|
||||
(cdMountPoints cd)
|
||||
(applyActionsToMountPoints desk actions)
|
||||
|
||||
@ -206,7 +206,7 @@ clay env plan =
|
||||
let hashedActions = map (calculateActionHash dir) actions
|
||||
for_ hashedActions (performAction mountPoint)
|
||||
|
||||
atomically $ modifyTVar
|
||||
atomically $ modifyTVar'
|
||||
(cdMountPoints cd)
|
||||
(applyActionsToMountPoints desk hashedActions)
|
||||
|
||||
@ -214,7 +214,7 @@ clay env plan =
|
||||
logInfo $ displayShow ("(clay) ogre:", p, desk)
|
||||
pierPath <- view pierPathL
|
||||
removeDirectoryRecursive $ pierPath </> deskToPath desk
|
||||
atomically $ modifyTVar (cdMountPoints cd) (M.delete desk)
|
||||
atomically $ modifyTVar' (cdMountPoints cd) (M.delete desk)
|
||||
|
||||
|
||||
-- Change the structures off of the event into something we can work with
|
||||
|
@ -126,7 +126,7 @@ client env plan = (initialEvents, runHttpClient)
|
||||
newReq :: HttpClientDrv -> ReqId -> HttpClientReq -> RIO e ()
|
||||
newReq drv id req = do
|
||||
async <- runReq drv id req
|
||||
atomically $ modifyTVar (hcdLive drv) (insertMap id async)
|
||||
atomically $ modifyTVar' (hcdLive drv) (insertMap id async)
|
||||
|
||||
-- The problem with the original http client code was that it was written
|
||||
-- to the idea of what the events "should have" been instead of what they
|
||||
|
Loading…
Reference in New Issue
Block a user