From 36dcaf52e44fc7ed8583fec88d72a8bc381ad5e9 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Sun, 3 Dec 2023 22:52:00 +0100 Subject: [PATCH] Add minor cosmetic improvement --- src/promesa/exec.cljc | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/promesa/exec.cljc b/src/promesa/exec.cljc index 6e890a3..9fa3708 100644 --- a/src/promesa/exec.cljc +++ b/src/promesa/exec.cljc @@ -332,17 +332,17 @@ thr))))))) #?(:clj -(defn forkjoin-thread-factory - ^ForkJoinPool$ForkJoinWorkerThreadFactory - [& {:keys [name daemon] :or {name "promesa/forkjoin/%s" daemon true}}] - (let [counter (AtomicLong. 0)] - (reify ForkJoinPool$ForkJoinWorkerThreadFactory - (newThread [_ pool] - (let [thread (.newThread ForkJoinPool/defaultForkJoinWorkerThreadFactory pool) - tname (format name (get-next counter))] - (.setName ^ForkJoinWorkerThread thread ^String tname) - (.setDaemon ^ForkJoinWorkerThread thread ^Boolean daemon) - thread)))))) + (defn forkjoin-thread-factory + ^ForkJoinPool$ForkJoinWorkerThreadFactory + [& {:keys [name daemon] :or {name "promesa/forkjoin/%s" daemon true}}] + (let [counter (AtomicLong. 0)] + (reify ForkJoinPool$ForkJoinWorkerThreadFactory + (newThread [_ pool] + (let [thread (.newThread ForkJoinPool/defaultForkJoinWorkerThreadFactory pool) + tname (format name (get-next counter))] + (.setName ^ForkJoinWorkerThread thread ^String tname) + (.setDaemon ^ForkJoinWorkerThread thread ^Boolean daemon) + thread)))))) #?(:clj (defonce default-thread-factory