In a thread-controlled environment, it could be great to provide our own ExecutorService instance in order to keep control over the thread pool instead of automatically instantiating a new newSingleThreadScheduledExecutor everytime we want to execute a command.
In the class ProcessExecutor, what do you think if we could have the possibility to do the following:
public StartedProcess start(ExecutorService providedService) throws IOException {
WaitForProcess task = startInternal();
ExecutorService service;
if (providedService == null) {
service = newExecutor(task);
} else {
service = providedService;
}
Future<ProcessResult> future = invokeSubmit(service, task);
This is not an issue but for us it appears as a limitation of the ProcessExecutor class.
In a thread-controlled environment, it could be great to provide our own ExecutorService instance in order to keep control over the thread pool instead of automatically instantiating a new
newSingleThreadScheduledExecutoreverytime we want to execute a command.In the class
ProcessExecutor, what do you think if we could have the possibility to do the following:This is not an issue but for us it appears as a limitation of the
ProcessExecutorclass.