| not minimizeprocesses || leftinpool == 0 =
liftIO $ atomically $ pushTransferrerPool pool i
| otherwise = liftIO $ do
- void $ forkIO $ stopTransferrer t
+ void $ forkIO $ shutdownTransferrer t
atomically $ pushTransferrerPool pool $ TransferrerPoolItem Nothing check
{- Check if a Transferrer from the pool is still ok to be used.
TransferrerPoolItem (Just t) check -> ifM check
( return i
, do
- stopTransferrer t
+ shutdownTransferrer t
new check
)
TransferrerPoolItem Nothing check -> new check
, transferrerHandle = pid
}
-{- Closing the fds will stop the transferrer, but only when it's in between
- - transfers. -}
-stopTransferrer :: Transferrer -> IO ()
-stopTransferrer t = do
+{- Closing the fds will shut down the transferrer, but only when it's
+ - in between transfers. -}
+shutdownTransferrer :: Transferrer -> IO ()
+shutdownTransferrer t = do
hClose $ transferrerRead t
hClose $ transferrerWrite t
void $ waitForProcess $ transferrerHandle t