Make JobExecutor implement java.lang.AutoCloseable
fmbenhassine opened this issue · 0 comments
fmbenhassine commented
JobExecutor
can implement java.lang.AutoCloseable
to be able to use it in a try-with-resources bloc and free the user from having to close it manually (and prevent him/her from forgetting to close it):
Job job = ..;
try (JobExecutor jobExecutor = new JobExecutor()) {
jobExecutor.execute(job);
}