on master help sign in
Expose an option to control the number of Shake threads (#504)
commit39605333c34039241768a1809024c739df3fb2bd authorPepe Iborra <pepeiborra@gmail.com> dateFri 27 Mar 2020, 17:54 (7 years ago) parent116a5ba
2 files changed+3
exe/Arguments.hs+2 exe/Main.hs+1
exe/Arguments.hs+2
@@ -13,6 +13,7 @@ data Arguments = Arguments
1313 ,argsVersion :: Bool
1414 ,argsShakeProfiling :: Maybe FilePath
1515 ,argsTesting :: Bool
16+ ,argsThreads :: Int
1617 }
1718
1819getArguments :: 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
@@ -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