[Haskell-cafe] Concurrency in Haskell

Donald Bruce Stewart dons at cse.unsw.edu.au
Fri Jan 26 19:51:30 EST 2007


deliverable:
> Well, I'm a bit suspicious if the top references on Haskell
> concurrency are either research papers or compiler manual sections.
> How about some good ol' bundles of them codes to peruse and take
> example from?  E.g., dining philosophers?

The point was that there are *lots* of examples out there :)

Typing 'concurrency' into the http://haskell.org wiki search box gives
me:

    http://www.haskell.org/haskellwiki/Concurrency_demos
    http://www.haskell.org/haskellwiki/Concurrency_demos/Zeta
    http://www.haskell.org/haskellwiki/Shootout/Cheap_concurrency
    http://www.haskell.org/haskellwiki/Concurrency_demos/Two_reader_threads
    http://www.haskell.org/haskellwiki/Libraries_and_tools/Concurrency_and_parallelism
    ...

A book chapter on concurrency in Haskell with software transactional
memory appeared just a few weeks ago:

    http://research.microsoft.com/~simonpj/tmp/beautiful.ps

And of course the very fast examples on the shootout:

    http://shootout.alioth.debian.org/gp4/benchmark.php?test=chameneos&lang=ghc&id=0
    http://shootout.alioth.debian.org/gp4/benchmark.php?test=message&lang=all

Another good resource for simple concurrency tutorials is the 'Awkward
Squad':
    http://research.microsoft.com/%7Esimonpj/Papers/marktoberdorf

Enjoy! Concurrency in Haskell is both fun and rich, since we have:

    explicit lightweight threads:
        http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent.html

    symmetric multiprocessor support:
        http://www.haskell.org/ghc/dist/current/docs/users_guide/sec-using-smp.html

    implicit parallelism:
        http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Parallel-Strategies.html

    software transactional memory:
        http://www.haskell.org/haskellwiki/Software_transactional_memory

    locks:
        http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent-MVar.html

    concurrent channels:
        http://haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent-Chan.html
       
    transparently parallel arrays:
        http://haskell.org/haskellwiki/GHC/Data_Parallel_Haskell
             
    user level threads and scheduling:
        http://www.seas.upenn.edu/~lipeng/homepage/unify.html

And more! As usual, http://haskell.org is the place to start.

Regards,
    Don


More information about the Haskell-Cafe mailing list