From 01408c8e05c1572dc0793b5ede375497c4b63fbf Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Wed, 18 Oct 2023 22:09:32 +0200 Subject: [PATCH] Add minor cosmetic improvements structured-task-scope related code --- src/promesa/exec.cljc | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/promesa/exec.cljc b/src/promesa/exec.cljc index 11b5e82..b84cd12 100644 --- a/src/promesa/exec.cljc +++ b/src/promesa/exec.cljc @@ -53,7 +53,6 @@ (declare scheduled-executor) (declare current-thread-executor) - #?(:clj (declare thread-factory)) #?(:clj (declare thread-per-task-executor)) #?(:clj (declare vthread-per-task-executor)) @@ -344,11 +343,11 @@ #?(:clj (defonce default-thread-factory - (delay (thread-factory :prefix "promesa/default/")))) + (delay (thread-factory :prefix "promesa/platform/")))) #?(:clj (defonce default-vthread-factory - (delay (thread-factory :prefix "promesa/default/" :virtual true)))) + (delay (thread-factory :prefix "promesa/virtual/" :virtual true)))) #?(:clj (defn- resolve-thread-factory @@ -359,6 +358,7 @@ (nil? tf) nil (thread-factory? tf) tf (= :default tf) @default-thread-factory + (= :platform tf) @default-thread-factory (= :virtual tf) @default-vthread-factory (map? tf) (thread-factory tf) (fn? tf) (reify ThreadFactory @@ -846,15 +846,13 @@ pt/IExecutor (-exec! [it task] - (.fork ^java.util.concurrent.StructuredTaskScope it - ^Callable task) + (.fork ^java.util.concurrent.StructuredTaskScope it ^Callable task) nil) (-run! [it task] (.fork ^java.util.concurrent.StructuredTaskScope it ^Callable task)) (-submit! [it task] (.fork ^java.util.concurrent.StructuredTaskScope it ^Callable task))))) - ;; #?(:clj ;; (defn managed-blocker ;; {:no-doc true}