Skip to content

Commit c914c35

Browse files
pepeiborrajneiramergify[bot]
authored
perform a GC before find resolution (#2144)
Co-authored-by: Javier Neira <[email protected]> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
1 parent e1b6cf3 commit c914c35

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: ghcide/test/exe/Main.hs

+2
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ import System.FilePath
7878
import System.IO.Extra hiding (withTempDir)
7979
import qualified System.IO.Extra
8080
import System.Info.Extra (isWindows)
81+
import System.Mem (performGC)
8182
import System.Process.Extra (CreateProcess (cwd),
8283
createPipe, proc,
8384
readCreateProcessWithExitCode)
@@ -5720,6 +5721,7 @@ unitTests = do
57205721
findResolution_us :: Int -> IO Int
57215722
findResolution_us delay_us | delay_us >= 1000000 = error "Unable to compute timestamp resolution"
57225723
findResolution_us delay_us = withTempFile $ \f -> withTempFile $ \f' -> do
5724+
performGC
57235725
writeFile f ""
57245726
threadDelay delay_us
57255727
writeFile f' ""

0 commit comments

Comments
 (0)