wanted: CAS on local variables

Bug #2096654 reported by Douglas Katzman
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
New
Wishlist
Unassigned

Bug Description

A user asked whether it would be possible to support the following uses of ATOMIC-{PUSH,POP}

  (let ((input list)
        (output nil)
        (threads))
    (dotimes (i n-threads)
      (push (sb-thread:make-thread
             (lambda ()
               (loop
                (let ((item (atomic-pop input)))
                  (unless item (return))
                  (let ((answer (compute-something item)))
                    (atomic-push answer output))))))
            threads))
    (mapc 'join-thread threads)
    output)

Douglas Katzman (dougk)
Changed in sbcl:
importance: Undecided → Wishlist
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.