Personal tools

Concurrency demos

From HaskellWiki

(Difference between revisions)
Jump to: navigation, search
m (Wikify link)
(category parallel)
 
(10 intermediate revisions by 5 users not shown)
Line 1: Line 1:
[[Category:Tutorials]]
+
This page collects examples of concurrent and parallel programming in Haskell.
[[Category:Code]]
+
  +
== Examples ==
  +
  +
* [[/Zeta |Riemann's Zeta function approximation]]
  +
* [[/Graceful exit|Signal that you want to gracefully exit another thread]]
  +
* [[/Two reader threads|Passing messages across a single chan to two readers]]
  +
* [[Implement a chat server|Chat server - using a single channel for a variable number of readers]]
  +
* [[/Simple producer and consumer|Passing IO events lazily from a producer to a consumer thread]]
  +
  +
== More examples ==
   
 
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>.
   
*[[Concurrency demos/Zeta |Riemann's Zeta function approximation]]
+
== Proposed updates ==
  +
  +
The base 3.0.3.1 package's Control.Concurrent.QSem and QSemN are not exception safe. The [[SafeConcurrent]] has the proposed replacement code.
  +
  +
== Other examples ==
  +
* [[/Haskell-Javascript concurrency|Haskell -> Javascript: Pseudo-concurrent threads in web browser]]
  +
  +
[[Category:Parallel]]
  +
[[Category:Tutorials]]
  +
[[Category:Code]]

Latest revision as of 16:18, 16 March 2011

This page collects examples of concurrent and parallel programming in Haskell.

Contents

[edit] 1 Examples

[edit] 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 of
MVars
and
forkIO
.

[edit] 3 Proposed updates

The base 3.0.3.1 package's Control.Concurrent.QSem and QSemN are not exception safe. The SafeConcurrent has the proposed replacement code.

[edit] 4 Other examples