core.async

Creating a timeout channel with a double causes the timeout-daemon to die

Details

  • Type: Defect Defect
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

I inadvertently passed a double to a timeout channel and discovered the following behavior using 0.1.242.0-44b1e3-alpha.

<code>
user=> (require '[clojure.core.async :as a])
nil
user=> (a/timeout 100.0)
#<ManyToManyChannel clojure.core.async.impl.channels.ManyToManyChannel@1009d11d>
user=> Exception in thread "clojure.core.async.timers/timeout-daemon" java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Long
at java.lang.Long.compareTo(Long.java:50)
at java.util.concurrent.ConcurrentSkipListMap.doRemove(ConcurrentSkipListMap.java:1064)
at java.util.concurrent.ConcurrentSkipListMap.remove(ConcurrentSkipListMap.java:1896)
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(Thread.java:722)

user=> (.isAlive clojure.core.async.impl.timers/timeout-daemon)
false
<code>

Activity

Timothy Baldridge made changes -
Field Original Value New Value
Resolution Completed [ 1 ]
Assignee Rich Hickey [ richhickey ] Timothy Baldridge [ halgari ]
Status Open [ 1 ] Resolved [ 5 ]

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: