Alex Collins – Blog

Things I'm learning; lessons or otherwise…

Clojure’s Concurrency: Futures and Agents in Harmony

by atc on July 29, 2012, no comments

I’ve previously written on the wonders of Clojure’s agents, giving the programmer a wonderfully easy way of writing asynchronous code with very little effort. Here’s a slightly more complex example for those wanting more context. Combining Futures and Agents We’ll use this (deliberately poor) inefficient find-primes in a (future) to allow for asynchronous processing in […]

00 (agent) – Clojure’s Concurrent Agents in action

by atc on July 29, 2012, 2 comments

or Clojure’s concurrency agents – a simple example Clojure has some fantastic concurrency idioms. Agents are but one example of what’s available to the JVM lisper — alongside refs, atoms and vars — that make concurrent programming very easy. I thought I’d articulate my understanding to help embed the knowledge but to also provide a […]