| ... | ... | @@ -27,6 +27,7 @@ Papers and other docs: |
|
|
|
- [ Extending the Haskell FFI with Concurrency](http://www.haskell.org/~simonmar/papers/conc-ffi.pdf) (a specification of the interaction between concurrency and the FFI, with a semantics)
|
|
|
|
- [ A Draft report addendum](http://www.haskell.org/ghc/docs/papers/threads.ps.gz) (a shorter version of the above paper).
|
|
|
|
- [ Software Transactional Memory](http://research.microsoft.com/~simonpj/papers/stm/)
|
|
|
|
- [ State Threads for C](http://state-threads.sourceforge.net/)
|
|
|
|
|
|
|
|
---
|
|
|
|
|
| ... | ... | @@ -34,7 +35,7 @@ Papers and other docs: |
|
|
|
# Proposal
|
|
|
|
|
|
|
|
|
|
|
|
## what is provided
|
|
|
|
## what is required by the standard
|
|
|
|
|
|
|
|
|
|
|
|
|
| ... | ... | @@ -68,6 +69,12 @@ Additionally, we have a fairness property of `MVar`s: |
|
|
|
This means that `MVar` blocking must be implemented in a fair way, eg. a FIFO of blocked threads.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
In order to meet the progress guarentee, an implementation must yield to
|
|
|
|
another thread, waiting for an appropriate event, before any action that
|
|
|
|
entails blocking for an indeterminate amount of time.
|
|
|
|
|
|
|
|
|
|
|
|
## `MVar` Guarentees
|
|
|
|
|
|
|
|
|
| ... | ... | @@ -163,6 +170,15 @@ The implementation additionally allows the following: |
|
|
|
- bound threads: `forkOS`, `isCurrentThreadBound`, `runInBoundThread`, `runInUnboundThread`
|
|
|
|
- concurrent/reentrant foreign calls are supported
|
|
|
|
|
|
|
|
# Notes - Sharing
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Although not mentioned in the standard, the use of Concurrency may affect
|
|
|
|
the lazy sharing of computations. Consult an implementations documentation if
|
|
|
|
this might be an issue for you.
|
|
|
|
|
|
|
|
|
|
|
|
# Status of Compilers
|
|
|
|
|
|
|
|
|
| ... | ... | |