Implement multi threading to improve throughput

This commit is contained in:
2022-03-06 20:02:10 +01:00
parent bba612476b
commit 03efab657c
6 changed files with 59 additions and 36 deletions

View File

@@ -37,4 +37,15 @@ public class ConfigUtil {
return null;
}
}
public static int getThreadCount() {
try {
return Integer.parseInt(new YAML(new File("config.yaml")).getString("threadCount"));
} catch (YamlInvalidContentException | IOException e) {
e.printStackTrace();
} catch (YamlKeyNotFoundException e) {
throw new RuntimeException(e);
}
return 1;
}
}