File tree 1 file changed +1
-13
lines changed
src/main/clojure/clojure/core/async/flow
1 file changed +1
-13
lines changed Original file line number Diff line number Diff line change 23
23
(defonce io-exec clojure.lang.Agent /soloExecutor )
24
24
(defonce compute-exec clojure.lang.Agent /pooledExecutor )
25
25
26
- (defn oid [x]
27
- (symbol (str (-> x class .getSimpleName) " @" (-> x System/identityHashCode Integer/toHexString))))
28
-
29
- (defn exec->data [exec]
30
- (let [ess (as-> (str exec) ^String es
31
- (.substring es (inc (.lastIndexOf es " [" )) (.lastIndexOf es " ]" ))
32
- (.split es " ," ))]
33
- (merge {:id (oid exec)
34
- :status (first ess)} ; ;TODO less fragile
35
- (zipmap [:pool-size :active-threads :queued-tasks :completed-tasks ]
36
- (map #(-> ^String % (.substring (inc (.lastIndexOf ^String % " " ))) Long.) (rest ess))))))
37
-
38
26
(defn datafy [x]
39
27
(condp instance? x
40
28
clojure.lang.Fn (-> x str symbol)
41
- ExecutorService (exec->data x)
29
+ ExecutorService (str x)
42
30
clojure.lang.Var (symbol x)
43
31
(datafy/datafy x)))
44
32
You can’t perform that action at this time.
0 commit comments