Created
June 12, 2010 19:17
-
-
Save danlarkin/435992 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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