Skip to content

Commit

Permalink
none of those mimics are necessary
Browse files Browse the repository at this point in the history
  • Loading branch information
ztellman committed Sep 6, 2012
1 parent f09a3be commit 0b789a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/lamina/core/channel.clj
Expand Up @@ -384,7 +384,7 @@
(defn aggregate
"something goes here"
[facet ch]
(let [ch* (mimic ch)
(let [ch* (channel)
lock (l/lock)
aggregator (atom (ConcurrentHashMap.))]
(bridge-join ch "aggregate"
Expand Down Expand Up @@ -412,7 +412,7 @@
(defn distribute-aggregate
"something goes here"
[facet channel-initializer ch]
(let [ch* (mimic ch)
(let [ch* (channel)
aggr (->> ch*
(aggregate :facet))
dist (distributor facet
Expand Down
6 changes: 3 additions & 3 deletions src/lamina/core/operators.clj
Expand Up @@ -401,11 +401,11 @@
from the source channel every 'period' milliseconds."
[period ch]
(let [val (atom ::none)
ch* (mimic ch)]
ch* (channel)]
(bridge-join ch (str "sample-every " period)
#(reset! val %)
ch*)
(siphon
(join
(->> #(deref val) (periodically period) (remove* #(= ::none %)))
ch*)
ch*))
Expand All @@ -420,7 +420,7 @@
(if (.isEmpty q)
msgs
(recur (conj msgs (.remove q))))))
ch* (mimic ch)]
ch* (channel)]
(bridge-join ch (str "partition-every " period)
#(.add q %)
ch*)
Expand Down

0 comments on commit 0b789a8

Please sign in to comment.