Skip to content
This repository was archived by the owner on Jul 22, 2025. It is now read-only.

Commit 01eced7

Browse files
authored
FIX: Ensure that we shutdown thread pool (#1207)
1 parent 451f766 commit 01eced7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/embeddings/vector.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def gen_bulk_reprensentations(relation)
4949
.zip(*promised_embeddings)
5050
.value!
5151
.each { |e| schema.store(e[:target], e[:embedding], e[:digest]) }
52-
52+
ensure
5353
pool.shutdown
5454
pool.wait_for_termination
5555
end

lib/sentiment/post_classification.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def bulk_classify!(relation)
9292
.zip(*promised_classifications)
9393
.value!
9494
.each { |r| store_classification(r[:target], r[:classification]) }
95-
95+
ensure
9696
pool.shutdown
9797
pool.wait_for_termination
9898
end

0 commit comments

Comments
 (0)