Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (def philosophers (into [] (repeatedly 5 #(ref :thinking))))
- (defn status-thread []
- (Thread.
- #(while true
- (dosync
- (println (map (fn [p] @p) philosophers))
- (Thread/sleep 100)))))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement