Skip to content

Commit

Permalink
put helpful metadata on clients and delimited-transport-seqs
Browse files Browse the repository at this point in the history
  • Loading branch information
cemerick committed Dec 10, 2012
1 parent c377dea commit 0ac39dc
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions src/main/clojure/clojure/tools/nrepl.clj
Expand Up @@ -54,6 +54,7 @@
tracking-seq)]
(reset! latest-head [0 head])
head)]
^{::transport transport ::timeout response-timeout}
(fn this
([] (or (second @latest-head)
(restart)))
Expand All @@ -70,13 +71,17 @@

(defn- delimited-transport-seq
[client termination-statuses delimited-slots]
(comp (partial take-until (comp #(seq (clojure.set/intersection % termination-statuses))
set
:status))
(let [keys (keys delimited-slots)]
(partial filter #(= delimited-slots (select-keys % keys))))
client
#(merge % delimited-slots)))
(with-meta
(comp (partial take-until (comp #(seq (clojure.set/intersection % termination-statuses))
set
:status))
(let [keys (keys delimited-slots)]
(partial filter #(= delimited-slots (select-keys % keys))))
client
#(merge % delimited-slots))
(-> (meta client)
(update-in [::termination-statuses] (fnil into #{}) termination-statuses)
(update-in [::taking-until] merge delimited-slots))))

(defn message
"Sends a message via [client] with a fixed message :id added to it.
Expand Down

0 comments on commit 0ac39dc

Please sign in to comment.