cljs.repl.server/set-connection

functionsince v0.0-1503Edit
(set-connection conn)

Source docstring:
Given a new available connection, poll the promise queue for and deliver
the connection. Otherwise put the connection into a FIFO queue.
Source code @ clojurescript:src/main/clojure/cljs/repl/server.clj
(defn set-connection
  [conn]
  (locking lock
    (if-let [p (.poll promiseq)]
      (deliver p conn)
      (.offer connq conn))))