chaselev-deque-0.1.1: Chase & Lev work-stealing lock-free double-ended queues (deques).

Safe HaskellSafe-Infered

Data.Concurrent.Deque.ChaseLev

Description

Chase-Lev work stealing Deques

This implementation derives directly from the pseudocode in the 2005 SPAA paper:

http:citeseerx.ist.psu.eduviewdocdownload?doi=10.1.1.170.1097&rep=rep1&type=pdf

Synopsis

Documentation

pushL :: ChaseLevDeque a -> a -> IO ()

For a work-stealing queue pushL is the `local' push. Thus only a single thread should perform this operation.

tryPopL :: ChaseLevDeque elt -> IO (Maybe elt)

tryPopR :: ChaseLevDeque elt -> IO (Maybe elt)

This is the steal operation. Multiple threads may concurrently attempt steals from the same thread.