mirror of
https://github.com/serokell/xrefcheck.git
synced 2024-10-26 15:35:29 +03:00
[#162] Remove artificial delay in allowRewrite
Problem: `allowRewrite` uses `threadDelay (ms 100)` to "prevent our output to interleave with further outputs". It's not exactly what problem this is supposed to address, and how it's supposed to fix it. This seems like it may have been an earlier attempt to fix the issue addressed in the previous commit. Solution: delete `threadDelay`.
This commit is contained in:
parent
1964f57280
commit
25d73c3d09
@ -31,7 +31,7 @@ import Universum
|
||||
|
||||
import Data.Ratio ((%))
|
||||
import System.Console.Pretty (Color (..), Style (..), color, style)
|
||||
import Time (Second, Time, ms, sec, threadDelay, unTime, (-:-))
|
||||
import Time (Second, Time, sec, unTime, (-:-))
|
||||
|
||||
-----------------------------------------------------------
|
||||
-- Task timestamp
|
||||
@ -225,8 +225,6 @@ allowRewrite enabled = bracket prepare erase
|
||||
erase (Rewrite RewriteCtx{..}) = liftIO $ do
|
||||
maxPrintedSize <- readIORef rMaxPrintedSize
|
||||
hPutStr stderr $ '\r' : replicate maxPrintedSize ' ' ++ "\r"
|
||||
-- prevent our output to interleave with further outputs
|
||||
threadDelay (ms 100)
|
||||
erase RewriteDisabled = pass
|
||||
|
||||
-- | Return caret and print the given text.
|
||||
|
Loading…
Reference in New Issue
Block a user