Created
September 19, 2011 20:50
-
-
Save srid/1227572 to your computer and use it in GitHub Desktop.
This file contains 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
(defn pop-log | |
"Pop the oldest entry from the log; return nil if none available" | |
[] | |
(when-not (empty? @incoming-log) | |
;; this is not right; peek'ing before pop'ing; queue may be modified in between? | |
(let [peeked (peek @incoming-log)] | |
(send incoming-log pop) | |
peeked))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment