| ... | ... | @@ -26,14 +26,15 @@ brief rationale. |
|
|
|
- Use `MVar`s. A non-concurrent implementation might implement them in terms of `IORef`, for example.
|
|
|
|
- Use STM. Easier to use, but not entirely trivial to implement, even in a single-threaded implementation, because exceptions have to abort a transaction ([ sample implementation](http://www.haskell.org//pipermail/haskell-prime/2006-March/001108.html)).
|
|
|
|
|
|
|
|
- Concurrent foreign calls are required.
|
|
|
|
- Concurrent foreign calls are required. A **concurrent foreign call** allows other Haskell threads to make progress before the foreign call returns.
|
|
|
|
**Rationale**:
|
|
|
|
|
|
|
|
- concurrent foreign calls are required to guarantee progress of other Haskell threads when one thread makes a blocking call.
|
|
|
|
- concurrent foreign calls are required for implementing I/O multiplexing, a principle use of concurrency.
|
|
|
|
- concurrent foreign calls are required for implementing I/O multiplexing, a principal use of concurrency.
|
|
|
|
- concurrent foreign calls are required to guarantee timely responsiveness of an interactive application in the presence of long-running foreign calls.
|
|
|
|
|
|
|
|
- Concurrent/reentrant foreign calls are required. Hence, the
|
|
|
|
- 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.
|
|
|
|
Hence, the
|
|
|
|
Haskell system must be able to process call-ins from arbitrary
|
|
|
|
external OS threads.
|
|
|
|
**Rationale**:
|
| ... | ... | |