Created
February 15, 2015 15:05
-
-
Save flyingmachine/ba9ae6e500896b1d2c78 to your computer and use it in GitHub Desktop.
enqueue expansion
This file contains hidden or 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
(let [saying (promise)] | |
(future (deliver saying (do (wait 100 "Cheerio!")))) | |
@(let [saying (promise)] | |
(future (deliver saying (do (wait 400 "Pip pip!")))) | |
@(let [saying (promise)] | |
(future (deliver saying (do (wait 200 (println "'Ello, gov'na!"))))) | |
(println @saying) | |
saying) | |
(println @saying) | |
saying) | |
(println @saying) | |
saying) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment