Skip to content

Instantly share code, notes, and snippets.

@danlarkin
Created June 12, 2010 19:17
Show Gist options
  • Save danlarkin/435992 to your computer and use it in GitHub Desktop.
Save danlarkin/435992 to your computer and use it in GitHub Desktop.
(send-off (agent 1) (fn [_]
(send-off (agent 2) (fn [_]
(println "Hey!")))
(Thread/sleep 4000)))
;; "Hey!" doesn't print for 4 seconds.
;; This is because actions to agent 2 won't be dispatched until agent 1 has finished its current action.
;; Why?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment