使用 <? and core async

问题描述 投票:0回答:0

我正在使用核心异步,并希望传播错误。

到目前为止我找到的解决方案是使用

<?
go-try

不过,问题在于它是否为我在频道上使用的每个功能“着色”。例如,如果我使用一些中间组合并将事物变成列表,

<?
不会抛出:

(defn uh-oh-go-try
  []
  (go-try
    (throw (Exception. "uh-oh"))))
(<?? (a/into [] (a/merge [(uh-oh-go-try) (uh-oh-go-try)])))
;; will not throw

有惯用的方法来处理这个吗?

clojure core.async
© www.soinside.com 2019 - 2024. All rights reserved.