Improve toolset for default tune canned tune generation #4871

This commit is contained in:
Andrey 2023-06-16 17:32:49 -04:00
parent 37b50ed794
commit b88e0eb8a7
2 changed files with 7 additions and 2 deletions

View File

@ -13,10 +13,15 @@ import java.util.function.Consumer;
public class SimulatorExecHelper {
private final static NamedThreadFactory THREAD_FACTORY = new NamedThreadFactory("SimulatorExecHelper", true);
private static final String SIMULATOR_BUILD_RUSEFI_SIMULATOR = "../simulator/build/rusefi_simulator";
// see also SimulatorHelper
private static final String SIMULATOR_BINARY = "../simulator/build/rusefi_simulator.exe";
private static final String SIMULATOR_BINARY = getSimulatorBinary();
private static Process simulatorProcess;
private static String getSimulatorBinary() {
return FileLog.isWindows() ? SIMULATOR_BUILD_RUSEFI_SIMULATOR + ".exe" : SIMULATOR_BUILD_RUSEFI_SIMULATOR;
}
/**
* This is currently used by auto-tests only. Todo: reuse same code for UI-launched simulator?
*/

View File

@ -196,7 +196,7 @@ public class LinkManager implements Closeable {
public final ExecutorService COMMUNICATION_EXECUTOR = new ThreadPoolExecutor(1, 1,
0L, TimeUnit.MILLISECONDS,
COMMUNICATION_QUEUE,
new NamedThreadFactory("communication executor"));
new NamedThreadFactory("communication executor", true));
public void assertCommunicationThread() {
if (Thread.currentThread() != communicationThread) {