Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 756
hawkeye Avatar asked Nov 23 '13 09:11

hawkeye


1 Answers

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.

like image 145
d.j.sheldrick Avatar answered Sep 22 '22 03:09

d.j.sheldrick