parent
b1d2dc599b
commit
ad6cd5989f
3 changed files with 12 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ A preview of the next release can be installed from
|
|||
## Unreleased
|
||||
|
||||
- Bump babashka.http-client to v0.4.15
|
||||
- [#1619](https://github.com/babashka/babashka/issues/1619): Fix reflection issue with `Thread/sleep` in `core.async/timeout`
|
||||
|
||||
## 1.3.184 (2023-08-22)
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
[sci.impl.copy-vars :refer [macrofy]]
|
||||
[sci.impl.vars :as vars]))
|
||||
|
||||
(set! *warn-on-reflection* true)
|
||||
|
||||
(def ^java.util.concurrent.Executor executor @#'async/thread-macro-executor)
|
||||
|
||||
(def ^java.util.concurrent.Executor virtual-executor
|
||||
|
|
@ -72,7 +74,7 @@
|
|||
(if virtual-executor
|
||||
(let [chan (async/chan nil)]
|
||||
(.execute virtual-executor (fn []
|
||||
(Thread/sleep ms)
|
||||
(Thread/sleep (long ms))
|
||||
(async/close! chan)))
|
||||
chan)
|
||||
(async/timeout ms)))
|
||||
|
|
|
|||
|
|
@ -42,3 +42,11 @@
|
|||
[(async/go
|
||||
(async/<! (async/timeout 100))
|
||||
10)])))))")))))
|
||||
|
||||
(deftest timeout-test
|
||||
(is (nil? (edn/read-string (test-utils/bb nil "
|
||||
(first (async/<!!
|
||||
(async/go
|
||||
(async/alts!
|
||||
[(async/go
|
||||
(async/<! (async/timeout (int 100))))]))))")))))
|
||||
|
|
|
|||
Loading…
Reference in a new issue