mirror of
https://github.com/janet-lang/janet
synced 2024-11-18 06:34:48 +00:00
13 lines
252 B
Clojure
13 lines
252 B
Clojure
(defn worker
|
|
"Run for a number of iterations."
|
|
[name iterations]
|
|
(for i 0 iterations
|
|
(ev/sleep 1)
|
|
(print "worker " name " iteration " i)))
|
|
|
|
(ev/call worker :a 10)
|
|
(ev/sleep 0.2)
|
|
(ev/call worker :b 5)
|
|
(ev/sleep 0.3)
|
|
(ev/call worker :c 12)
|