File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1818 ThreadFactory
1919 TimeUnit]))
2020
21+ (set! *warn-on-reflection* true )
22+
2123; ;;
2224
2325(def ^ThreadLocal executor-thread-local (ThreadLocal. ))
5860 (.set current-executor-thread-local executor)
5961 (.run ^Runnable runnable)))
6062
61- (defn- wrap-thread-factory [tf executor-promise]
63+ (defn- wrap-thread-factory [^ThreadFactory tf executor-promise]
6264 (reify ThreadFactory
6365 (newThread [_ runnable]
6466 (.newThread tf (wrap-thread-runnable runnable executor-promise)))))
7577 | `onto?` | if true, all streams and deferred generated in the scope of this executor will also be 'on' this executor. |"
7678 ([executor]
7779 (wrap-executor executor {}))
78- ([executor
80+ ([^java.util.concurrent.Executor executor
7981 {:keys [thread-factory
8082 onto?]
8183 :or {onto? true }}]
8284 (if (instance? IExecutorTracking executor)
8385 executor
8486 (let [executor-promise (promise )
8587 wrapped-executor (if thread-factory
86- (let [executor (executor (wrap-thread-factory thread-factory executor-promise))]
88+ (let [^java.util.concurrent.Executor executor (executor (wrap-thread-factory thread-factory executor-promise))]
8789 (reify java.util.concurrent.Executor
8890 (execute [_ runnable]
8991 (.execute executor runnable))
You can’t perform that action at this time.
0 commit comments