Skip to content

Instantly share code, notes, and snippets.

@rbnpercy
Created July 24, 2019 17:28
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 rbnpercy/303bb353acd1459225be744a701b4a6c to your computer and use it in GitHub Desktop.
Save rbnpercy/303bb353acd1459225be744a701b4a6c to your computer and use it in GitHub Desktop.
(ns async-example.core
(:require [clojure.core.async :refer :all])
(:gen-class))
(defn -main [& args]
(doseq [i (range 10)]
(go
(Thread/sleep (rand-int 1000))
(println i)))
(Thread/sleep 2000))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment