Skip to content

Instantly share code, notes, and snippets.

@Chouser
Created April 27, 2010 14:16
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 Chouser/380762 to your computer and use it in GitHub Desktop.
Save Chouser/380762 to your computer and use it in GitHub Desktop.
(use 'net.n01se.clojure-jna)
(doseq [i (range 4)]
(future
(jna-invoke Integer c/sleep 2)
(prn i)))
; ...waits about 2 seconds, then prints all four number. Seems to suggest
; nothing in this particular example is synchronized.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment