Skip to content

Instantly share code, notes, and snippets.

@sarcilav
Created December 3, 2015 15:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sarcilav/a5582ca45f735bc16a0b to your computer and use it in GitHub Desktop.
Save sarcilav/a5582ca45f735bc16a0b to your computer and use it in GitHub Desktop.
(let [ex-agent (agent {:user_id 1 :user_email "s@gmail.com"})
fn-agent (fn [{id :user_id email :user_email}]
(println "staring super heavy IO task")
(Thread/sleep 10000)
(println "email send to" email))]
(println "sending task to agent")
(send-off ex-agent fn-agent)
(println "end let"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment