简体   繁体   中英

Does Scala Async do everything that Clojure's core.async does?

In this presentation Haller talks about Scala Async.

In this presentation - Rich Hickey talks about Clojure's core.async.

Both appear to be macros - but Scala Async (correct me if I'm wrong) doesn't seem to have a concept of CSP or channels.

What are the differences between Scala Async and Clojure's core.async?

core.async's go macro provides non-blocking put and take operations for 'channels', which are otherwise-blocking many-to-many queues.

Scala Async's async macro provides a non-blocking wait operation for results of ordinary Future s.

So the answer is no. core.async is about communication between concurrent processes, while Scala Async deals with simply waiting for concurrent processes to finish. core.async can easily simulate the functionality of Scala Async, but not vice-versa.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM