This commit is contained in:
@@ -146,9 +146,12 @@
|
|||||||
(defn- timeout-snippet-promises [snippet-promises fut]
|
(defn- timeout-snippet-promises [snippet-promises fut]
|
||||||
;; Time out after twenty seconds. With all the LaTeX and IPC, there
|
;; Time out after twenty seconds. With all the LaTeX and IPC, there
|
||||||
;; are so many opportunities for things to go wrong </3.
|
;; are so many opportunities for things to go wrong </3.
|
||||||
(let [fut-res (deref fut (* 20 1000) ::timed-out)]
|
(let [ms (* 20 1000)
|
||||||
|
fut-res (deref fut ms ::timed-out)]
|
||||||
(if (= fut-res ::timed-out)
|
(if (= fut-res ::timed-out)
|
||||||
(do (future-cancel fut)
|
(do (l/warnf "Giving up on rendering TeX snippets after %.3f seconds."
|
||||||
|
(* ms 1000))
|
||||||
|
(future-cancel fut)
|
||||||
(doseq [[_snippet p] snippet-promises]
|
(doseq [[_snippet p] snippet-promises]
|
||||||
(deliver p ::timed-out)))
|
(deliver p ::timed-out)))
|
||||||
fut-res)))
|
fut-res)))
|
||||||
|
|||||||
Reference in New Issue
Block a user