Anyone encountered after a few reloads at the repl core.async stops
working.?

Thanks

(ns repl.core
  (:require [clojure.core.async :refer :all])) ;;0.1.0-SNAPSHOT

(defn producer[c]
  (Thread/sleep 1000)
  (go (>! c true))
  (println "sleeping")
  (Thread/sleep 10000))

(defn consumer [c]
  (let [res (alts!! [c (timeout 2000)])]
    (if (= c (second res))
      (println "true")
      (println "timeout"))))

(defn main []
  (let [c (chan)]
    (future (producer c))
    (consumer c)))

nREPL server started on port 50616 on host 127.0.0.1
REPL-y 0.2.1
Clojure 1.5.0
    Docs: (doc function-name-here)
          (find-doc "part-of-name-here")
  Source: (source function-name-here)
 Javadoc: (javadoc java-object-or-class-here)
    Exit: Control+D or (exit) or (quit)

user=> (require '[repl.core :as r] :reload-all)
nil
user=> (r/main)
sleeping
true
nil
user=> (require '[repl.core :as r] :reload-all)
nil
user=> (r/main)
sleeping
true
nil
user=> Exception in thread "clojure.core.async.timers/timeout-daemon"
java.lang.ClassCastException: clojure.core.async.i
mpl.timers.TimeoutQueueEntry cannot be cast to
clojure.core.async.impl.timers.TimeoutQueueEntry
        at
clojure.core.async.impl.timers$timeout_worker.invoke(timers.clj:61)
        at clojure.lang.AFn.run(AFn.java:24)
        at java.lang.Thread.run(Unknown Source)


user=> (require '[repl.core :as r] :reload-all)
nil
user=> (r/main)
sleeping
true
nil
user=> (require '[repl.core :as r] :reload-all)
nil
user=> (r/main)

ClassCastException clojure.core.async.impl.timers.TimeoutQueueEntry cannot
be cast to clojure.core.async.impl.timers.Tim
eoutQueueEntry  clojure.core.async.impl.timers.TimeoutQueueEntry
(timers.clj:33)
user=> sleeping

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to