Skip to content

Commit e0c4237

Browse files
committed
report indexing in another thread
1 parent 63a4c10 commit e0c4237

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

ghcide/src/Development/IDE/Core/Compile.hs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -927,9 +927,9 @@ indexHieFile se mod_summary srcPath !hash hf = do
927927
-- Using `finally`, so even if an exception happen during withHieDb call,
928928
-- the the ending part of `reportProgress` (which clean the progress indicator) will still be called.
929929
indexDoneB <- liftIO newBarrier
930-
withAsync (reportProgress indexDoneB optProgressStyle) $ \preAsync ->
931-
flip finally (signalBarrier indexDoneB ()) $
932-
withHieDb (\db -> HieDb.addRefsFromLoaded db targetPath (HieDb.RealFile $ fromNormalizedFilePath srcPath) hash hf')
930+
_ <- async (reportProgress indexDoneB optProgressStyle)
931+
flip finally (signalBarrier indexDoneB ()) $
932+
withHieDb (\db -> HieDb.addRefsFromLoaded db targetPath (HieDb.RealFile $ fromNormalizedFilePath srcPath) hash hf')
933933
where
934934
mod_location = ms_location mod_summary
935935
targetPath = Compat.ml_hie_file mod_location

0 commit comments

Comments
 (0)