mirror of https://github.com/voidlizard/hbs2
wip, minor fix
This commit is contained in:
parent
ec7eea1ac6
commit
f6b756fd31
|
@ -343,10 +343,9 @@ ncqStorageRun2 :: forall m . MonadUnliftIO m
|
|||
-> m ()
|
||||
ncqStorageRun2 ncq@NCQStorage2{..} = flip runContT pure do
|
||||
|
||||
jobQ <- newTQueueIO
|
||||
closeQ <- newTQueueIO
|
||||
|
||||
closer <- ContT $ withAsync $ liftIO $ fix \loop -> do
|
||||
closer <- spawnActivity $ liftIO $ fix \loop -> do
|
||||
what <- atomically do
|
||||
stop <- readTVar ncqStorageStopReq
|
||||
tryReadTQueue closeQ >>= \case
|
||||
|
@ -367,8 +366,6 @@ ncqStorageRun2 ncq@NCQStorage2{..} = flip runContT pure do
|
|||
ncqAlterEntrySTM ncq (coerce k) (const Nothing)
|
||||
loop
|
||||
|
||||
link closer
|
||||
|
||||
spawnActivity $ forever (liftIO $ join $ atomically (readTQueue ncqJobQ))
|
||||
|
||||
spawnActivity measureWPS
|
||||
|
|
Loading…
Reference in New Issue