Interrupt all running tasks during shutdown#6118
Conversation
…s to be executed) Co-authored-by: Stefan Kolb <stefan-kolb@web.de>
tobiasdiez
left a comment
There was a problem hiding this comment.
Should the same strategy also be used to shutdown the executors in JabRefExecutorService and DefaultTaskExecutor ?
|
Not 100 % sure if this works, tho. We need to analyze our total executor architecture, I guess. Maybe we should alos document that in a markdown file as it is crucial for the application. |
|
Does this affect the WaitForSavedFinishedDialog? |
|
Could also ref #5967. |
No, because other sequence in the program flow. (Should I draw Sequence Diagrams? ^^) |
Extended to Extension to |
| } | ||
| } | ||
| } catch (InterruptedException ie) { | ||
| executorService.shutdownNow(); |
| } | ||
|
|
||
| /** | ||
| * Shuts everything down. Upon termination, this method returns. |
There was a problem hiding this comment.
Can't do - Added a comment to TaskExecutor
| // kill the remote thread | ||
| stopRemoteThread(); | ||
|
|
||
| try { |
There was a problem hiding this comment.
extract try block to method and call it for executorService and lowPriorityExecutorService
| if (executorService.awaitTermination(60, TimeUnit.SECONDS)) { | ||
| LOGGER.debug("One minute passed again - forced shutdown worked."); | ||
| } else { | ||
| LOGGER.error("DelayedTaskThrottler did not terminate"); |
There was a problem hiding this comment.
thats not the delayed task throttler
| public void shutdown() { | ||
| // this is non-blocking. See https://stackoverflow.com/a/57383461/873282. | ||
| executor.shutdown(); | ||
| try { |
39fede5 Update associacao-brasileira-de-normas-tecnicas.csl (#6138) fde7695 Include chapter title (#6140) 1e3d8b4 Update n.d. abbreivation for DGP style (#6136) ebb728b suffix '.' after first group; changed e-mail (#6135) eed4f07 Update and rename sciences-po-ecole-doctorale-note-french.csl to scie… (#6127) f194647 Delete TU Dresden Medizin as requested by library (#6131) d8423d8 Create entomological-review.csl (#6120) 064a394 Create australasian-journal-of-philosophy.csl (#6063) a998ded Add composer.json (#5668) 37083c9 Update copernicus-publications.csl (#6062) 694c97b Create chaucer review (#6061) 625a424 Create haffner-style-manual.csl (#6054) 8b7224b make annals-of-allergy-asthma-and-immunology independent (#6041) 710748c Create university-of-pretoria-harvard-theology-religion.csl (#6106) d16dffd Create health-physics.csl (#6040) ca9e184 Update style-manual-australian-government.csl (#6119) e412277 Create chemical-engineering-technology.csl (#6039) bebdb48 Create bibliothek-forschung-und-praxis.csl (#6038) 29e49cd Update nature.csl (#6117) 891897d fix short title for SBL (#6118) git-subtree-dir: buildres/csl/csl-styles git-subtree-split: 39fede5
c750b6e APA: Put conditional event-title logic in a macro (#6161) a87414f Remove month from association-for-compuational-linguistics.csl (#6158) 6153db0 Remove issue numbers from BJOC style (#6155) e231ea3 Bug fix for `event` regression (#6154) 0dab651 Add event-title to other APA styles (#6153) 698cf1c APA: `event-title` and conditional `event` (#6152) 58d3f8f Update vancouver-author-date.csl (#6148) f1638a9 add substitute to Vancouver author date (#6147) 39fede5 Update associacao-brasileira-de-normas-tecnicas.csl (#6138) fde7695 Include chapter title (#6140) 1e3d8b4 Update n.d. abbreivation for DGP style (#6136) ebb728b suffix '.' after first group; changed e-mail (#6135) eed4f07 Update and rename sciences-po-ecole-doctorale-note-french.csl to scie… (#6127) f194647 Delete TU Dresden Medizin as requested by library (#6131) d8423d8 Create entomological-review.csl (#6120) 064a394 Create australasian-journal-of-philosophy.csl (#6063) a998ded Add composer.json (#5668) 37083c9 Update copernicus-publications.csl (#6062) 694c97b Create chaucer review (#6061) 625a424 Create haffner-style-manual.csl (#6054) 8b7224b make annals-of-allergy-asthma-and-immunology independent (#6041) 710748c Create university-of-pretoria-harvard-theology-religion.csl (#6106) d16dffd Create health-physics.csl (#6040) ca9e184 Update style-manual-australian-government.csl (#6119) e412277 Create chemical-engineering-technology.csl (#6039) bebdb48 Create bibliothek-forschung-und-praxis.csl (#6038) 29e49cd Update nature.csl (#6117) 891897d fix short title for SBL (#6118) git-subtree-dir: buildres/csl/csl-styles git-subtree-split: c750b6e
(and don't allow new tasks to be executed)
This fixes #6109.
We invesitgated the shutdown procedure. We think that a thread creating a
.savfile is still hanging around AFTER the throttler was shut down. And the.savfile was deleted afterwards. The.savfile was recreated after the deletion...