Awesome!
I did try it on our project and it failed at one location with:
CompilerException java.lang.UnsupportedOperationException: Can only recur
from tail position
Minimal example which still fails (alts! + case + recur combination) is:
(defn this-fails-to-compile [x]
(go
(loop []
(let [_ (async/alts! [,,,])]
(case :whatever
:something
(recur))))))
I guess this should work(?) Should I report it somewhere?
Thanks,
Marian
On Wednesday, October 28, 2015 at 10:06:41 PM UTC+1, Alex Miller wrote:
>
> I am happy to announce a long-overdue core.async release.
>
> Dependency info: [org.clojure/core.async "0.2.371"]
>
> There are a few new features in this release:
>
> 1) *promise-chan* is a function that returns a new kind of channel (with
> a custom buffer) with promise semantics. Specifically, channels make a
> one-time transition to having a deliverable value. *promise-chan* takes
> an optional transducer, and an optional exception-handler (like chan). A
> promise channel can take exactly one value that consumers will receive.
> Once full, puts complete but val is dropped (no transfer).
> Consumers will block until either a value is placed in the channel or the
> channel is closed (and nil will be delivered).
>
> 2) *offer!* and *poll!* are two new non-blocking functions available on
> channels.
>
> offer! puts a val into a channel if it can do so immediately and will
> never block. Returns true if offer succeeds.
> poll! takes a val from a channel if it can do so immediately and will
> never block. Return a value if successful, nil otherwise.
>
> All changes:
>
> - ASYNC-103 <http://dev.clojure.org/jira/browse/ASYNC-103> - NEW
> promise-chan
> - ASYNC-104 <http://dev.clojure.org/jira/browse/ASYNC-104> - NEW
> non-blocking offer!, poll!
> - ASYNC-124 <http://dev.clojure.org/jira/browse/ASYNC-124> - dispatch
> multiple pending takers resulting from expanding transducer
> - ASYNC-101 <http://dev.clojure.org/jira/browse/ASYNC-101> -
> async/reduce now respects reduced
> - ASYNC-112 <http://dev.clojure.org/jira/browse/ASYNC-112> - replace
> "transformer" with "transducer" in deprecation messages
> - ASYNC-6 <http://dev.clojure.org/jira/browse/ASYNC-6> - alts! docs
> updated to explicitly state ports is a vector
> - Support (try (catch :default)) in CLJS exception handling
> - Use cljs.test
> - Updated tools.analyzer.jvm version (and other upstream deps) - fixes
> various analyzer errors
>
>
>
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
---
You received this message because you are subscribed to the Google Groups
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.