File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 355
355
(ioc/run-state-machine state#))))
356
356
c#))
357
357
358
- #_(defonce ^:private ^Executor thread-macro-executor
358
+ #_(defonce ^:private ^Executor thread-macro-executor ; ;; readlly we don't need this
359
359
(Executors/newCachedThreadPool (conc/counted-thread-factory " async-thread-macro-%d" true )))
360
360
361
- #_ (defn thread-call
361
+ (defn thread-call
362
362
" Executes f in another thread, returning immediately to the calling
363
363
thread. Returns a channel which will receive the result of calling
364
364
f when completed."
365
365
[f]
366
366
(let [c (chan 1 )]
367
- (.execute thread-macro-executor
368
- (fn []
367
+ (System.Threading.Tasks.Task/Run ; ;; .execute thread-macro-executor
368
+ (gen-delegate System.Action [] ; ;; fn []
369
369
(let [ret (try (f )
370
- (catch Throwable t
370
+ (catch Exception t ; ;; Throwable
371
371
nil ))]
372
372
(when-not (nil? ret)
373
373
(>!! c ret))
374
374
(close! c))))
375
375
c))
376
376
377
- #_ (defmacro thread
377
+ (defmacro thread
378
378
" Executes the body in another thread, returning immediately to the
379
379
calling thread. Returns a channel which will receive the result of
380
380
the body when completed."
You can’t perform that action at this time.
0 commit comments