for (int i = 0; i < numThreads; i++) {
final int threadID = i;
threads[i] = new Thread() {
public void run() {
ModuleName moduleName = ModuleName.make("TempModule" + threadID);
MessageLogger messageLogger = new MessageLogger();
workspaceManager.makeModule(new SourceModelModuleSource(SourceModelUtilities.TextParsing.parseModuleDefnIntoSourceModel("module " + moduleName + "; import " + CAL_Prelude.MODULE_NAME + "; public foo x = (\\y -> x + x + y) 3.0; public bar = foo;")), messageLogger);
if (messageLogger.getNErrors() > 0) {
multithreadedAssertEquals("No compilation errors", messageLogger.toString(), assertList);
} else {
for (int k = 0; k < numDependentModules; k++) {
String moduleName2 = "TempModule" + threadID + "_" + k;
workspaceManager.makeModule(new SourceModelModuleSource(SourceModelUtilities.TextParsing.parseModuleDefnIntoSourceModel("module " + moduleName2 + "; import " + CAL_Prelude.MODULE_NAME + "; import " + moduleName + ";")), messageLogger);
}
if (messageLogger.getNErrors() > 0) {
multithreadedAssertEquals("No compilation errors", messageLogger.toString(), assertList);
} else {
for (int j = 0; j < numCompilationsPerThread; j++) {
help_compileEvalTestFunctionForThread(workspaceManager, moduleName, threadID, j, numEvalTries, assertList);
for (int k = 0; k < numDependentModules; k++) {
ModuleName moduleName2 = ModuleName.make("TempModule" + threadID + "_" + k);
help_compileEvalDependentTestFunctionForThread(workspaceManager, moduleName2, moduleName + ".bar 5.0", new Double(13.0), threadID, j, numEvalTries, assertList);
}
}
}
}