Uploaded image for project: 'core.async'
  1. ASYNC-45

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Completed
    • 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>

        Attachments

          Activity

            People

            • Assignee:
              halgari Timothy Baldridge
              Reporter:
              alex+import import
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: