Legend:

* Use STM. Easier to use, but not entirely trivial to implement, even in a single-threaded implementation, because exceptions have to abort a transaction ([http://www.haskell.org//pipermail/haskell-prime/2006-March/001108.html sample implementation]).

19

19

20

* Concurrent foreign calls are required.

20

* Concurrent foreign calls are required. A '''concurrent foreign call''' allows other Haskell threads to make progress before the foreign call returns.

21

21

[[BR]]'''Rationale''':

22

22

* concurrent foreign calls are required to guarantee progress of other Haskell threads when one thread makes a blocking call.

23

* concurrent foreign calls are required for implementing I/O multiplexing, a principle use of concurrency.

23

* concurrent foreign calls are required for implementing I/O multiplexing, a principal use of concurrency.

24

24

* concurrent foreign calls are required to guarantee timely responsiveness of an interactive application in the presence of long-running foreign calls.

25

25

26

* Concurrent/reentrant foreign calls are required. Hence, the

26

* Concurrent/reentrant foreign calls are required. A '''reentrant foreign call''' is a foreign call that calls a foreign-exported Haskell function. A concurent/reentrant foreign call is both concurrent and reentrant.