Skip to content

Commit

Permalink
Fix thread leak due to created executors never being shutdown
Browse files Browse the repository at this point in the history
  • Loading branch information
qqndrew committed Mar 8, 2023
1 parent acb33fe commit cc9f881
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>org.ohnlp.medtagger</groupId>
<artifactId>medtagger</artifactId>
<version>1.0.54</version>
<version>1.0.55</version>
<description>The MedTagger biomedical information extraction pipeline</description>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ public void processElement(@Element Row input, OutputReceiver<Row> output) {
if (t != null) {
throw new RuntimeException(t);
}
nlpExecutor.shutdownNow();
} catch (InterruptedException | ExecutionException | TimeoutException e) {
System.out.println("Skipping document " + id + " due to NLP run taking longer than 30 seconds");
future.cancel(true);
Expand Down

0 comments on commit cc9f881

Please sign in to comment.