Skip to content
This repository was archived by the owner on Jan 2, 2021. It is now read-only.

Commit 3960533

Browse files
authored
Expose an option to control the number of Shake threads (#504)
1 parent 116a5ba commit 3960533

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

exe/Arguments.hs

+2
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ data Arguments = Arguments
1313
,argsVersion :: Bool
1414
,argsShakeProfiling :: Maybe FilePath
1515
,argsTesting :: Bool
16+
,argsThreads :: Int
1617
}
1718

1819
getArguments :: IO Arguments
@@ -31,3 +32,4 @@ arguments = Arguments
3132
<*> switch (long "version" <> help "Show ghcide and GHC versions")
3233
<*> optional (strOption $ long "shake-profiling" <> metavar "DIR" <> help "Dump profiling reports to this directory")
3334
<*> switch (long "test" <> help "Enable additional lsp messages used by the testsuite")
35+
<*> option auto (short 'j' <> help "Number of threads (0: automatic)" <> metavar "NUM" <> value 0 <> showDefault)

exe/Main.hs

+1
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ main = do
100100
{ optReportProgress = clientSupportsProgress caps
101101
, optShakeProfiling = argsShakeProfiling
102102
, optTesting = argsTesting
103+
, optThreads = argsThreads
103104
, optInterfaceLoadingDiagnostics = argsTesting
104105
}
105106
debouncer <- newAsyncDebouncer

0 commit comments

Comments
 (0)