hawkeye
hawkeye

Reputation: 35742

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?

Upvotes: 6

Views: 571

Answers (1)

d.j.sheldrick
d.j.sheldrick

Reputation: 1591

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 Futures.

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.

Upvotes: 8

Related Questions