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

Channels with transducer using reduced don't work as intended

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
    • Environment:

      CLJ 1.7.0-RC1, (CLJS not tested)

      Description

      (def ch (chan 1 (take 2)))
      
      (put! ch 1)
      (put! ch 2)
      (put! ch 3)
      
      (take! ch identity)
      
      

      ClassCastException clojure.lang.PersistentVector cannot be cast to java.util.concurrent.locks.Lock clojure.core.async.impl.channels.ManyToManyChannel (channels.clj:55)

      This does not happen if a take is made before the first put so that the buffer size fits. The problem doesn't seem to be related only to the buffer size though.

      (def ch (chan 1 (take-while true?)))
      
      (put! ch true)
      (put! ch false)
      (put! ch false)
      
      (take! ch identity)
      

      ClassCastException clojure.lang.PersistentVector cannot be cast to java.util.concurrent.locks.Lock clojure.core.async.impl.channels.ManyToManyChannel (channels.clj:55)

        Attachments

          Activity

            People

            • Assignee:
              gshayban Ghadi Shayban
              Reporter:
              lgs32a Leon Grapenthin
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: