Concurrency demos
From HaskellWiki
(Difference between revisions)
(→Examples: Move link) |
(Added link to Haskell/Javascript concurrency demo) |
||
| Line 13: | Line 13: | ||
A large range of small demonstration programs for using concurrent and | A large range of small demonstration programs for using concurrent and | ||
parallel Haskell are in the Haskell [http://darcs.haskell.org/testsuite/tests/ghc-regress/concurrent/should_run/ concurrency regression tests]. In particular, they show the use of <hask>MVars</hask> and <hask>forkIO</hask>. | parallel Haskell are in the Haskell [http://darcs.haskell.org/testsuite/tests/ghc-regress/concurrent/should_run/ concurrency regression tests]. In particular, they show the use of <hask>MVars</hask> and <hask>forkIO</hask>. | ||
| + | |||
| + | == Other examples == | ||
| + | * [[/Haskell-Javascript concurrency|Haskell -> Javascript: Pseudo-concurrent threads in web browser]] | ||
[[Category:Tutorials]] | [[Category:Tutorials]] | ||
[[Category:Code]] | [[Category:Code]] | ||
Revision as of 05:29, 22 November 2007
This page collects examples of concurrent and parallel programming in Haskell.
1 Examples
- Riemann's Zeta function approximation
- Signal that you want to gracefully exit another thread
- Passing messages across a single chan to two readers
- Chat server - using a single channel for a variable number of readers
- Passing IO events lazily from a producer to a consumer thread
2 More examples
A large range of small demonstration programs for using concurrent and
parallel Haskell are in the Haskell concurrency regression tests. In particular, they show the use ofMVars
forkIO
