From a4dd7e4e9c98fad629430b40a1b2f07af8ce41db Mon Sep 17 00:00:00 2001 From: Nick Alexander Date: Thu, 13 Oct 2016 14:28:23 -0700 Subject: [PATCH] Review comment: make a large-ish dropping buffer for JS listen! consumers. --- src/common/datomish/transact.cljc | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/common/datomish/transact.cljc b/src/common/datomish/transact.cljc index 3c369ba7..81daefc8 100644 --- a/src/common/datomish/transact.cljc +++ b/src/common/datomish/transact.cljc @@ -648,8 +648,9 @@ (a/tap (:listener-mult conn) listener-sink) listener-sink) -(defn- -listen-chan [f] - (let [c (a/chan (a/sliding-buffer 10))] +(defn- -listen-chan + [f n] + (let [c (a/chan (a/dropping-buffer n))] (go-loop [] (when-let [v (