From 73fe77e58fbd9d0bd4365bafdef98e7d2ce72a48 Mon Sep 17 00:00:00 2001 From: Benjamin Prud'homme <139664105+bgprudhomme@users.noreply.github.com> Date: Mon, 26 Aug 2024 15:54:55 -0400 Subject: [PATCH] Update ShaclSail.java --- .../main/java/org/eclipse/rdf4j/sail/shacl/ShaclSail.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclSail.java b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclSail.java index c550bc6eee..f1ebe143ce 100644 --- a/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclSail.java +++ b/core/sail/shacl/src/main/java/org/eclipse/rdf4j/sail/shacl/ShaclSail.java @@ -252,9 +252,10 @@ public void setBaseSail(Sail baseSail) { @Experimental protected RevivableExecutorService getExecutorService() { return new RevivableExecutorService( - () -> Executors.newThreadPerTaskExecutor( + // Does refactoring this cause tests to hang? + () -> Executors.newFixedThreadPool(AVAILABLE_PROCESSORS, r -> { - Thread t = Thread.ofVirtual().factory().newThread(r); + Thread t = Executors.defaultThreadFactory().newThread(r); // this thread pool does not need to stick around if the all other threads are done, because // it is only used for SHACL validation and if all other threads have ended then there would // be no thread to receive the validation results.