Changes between Version 29 and Version 30 of Concurrency


Ignore:
Timestamp:
Apr 13, 2006 1:14:23 PM (9 years ago)
Author:
simonmar@…
Comment:

add proposals + rationale from the discussion (more to come)

Legend:

Unmodified
Added
Removed
Modified
  • Concurrency

    v29 v30  
    22[[PageOutline]]
    33
     4== Proposals ==
     5
     6These are proposals on which we are generally agreed so far, with
     7brief rationale.
     8
     9 * Some kind of concurrency will be included in the spec, including {{{MVar}}}s for communication.[[BR]]At least the following interface will be provided:
     10   * [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent-MVar.html Control.Concurrent.MVar] - everything except {{{addMVarFinalizer}}}
     11   * [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent.html Control.Concurrent] - {{{ThreadId}}}, {{{myThreadId}}}, {{{forkIO}}}, {{{yield}}}, {{{sleep}}} (replaces {{{threadDelay}}}).
     12   * {{{Control.Concurrent.Chan}}}, {{{Control.Concurrent.QSem}}},
     13     {{{Control.Concurrent.QSemN}}}, {{{Control.Concurrent.SampleVar}}}
     14
     15 * Concurrent foreign calls are required.
     16   [[BR]]'''Rationale''':
     17   * concurrent foreign calls are required to guarantee progress of other Haskell threads when one thread makes a blocking call.
     18   * concurrent foreign calls are required for implementing I/O multiplexing, a principle use of concurrency.
     19   * concurrent foreign calls are required to guarantee timely  responsiveness of an interactive application in the presence of long-running foreign calls.
     20
     21 * Concurrent/reentrant foreign calls are required.  Hence,  the
     22   Haskell system must be able to process call-ins from arbitrary
     23   external OS threads.
     24   [[BR]]'''Rationale''':
     25   * the main loop of a GUI may block (hence concurrent) and makes callbacks (hence reentrant), we need to support this kind of usage.
     26   * providing concurrent/reentrant foreign calls does not impose significant extra overhead on the rest of the system.  For example, a call-in can check a thread-local variable (fast) to see whether it arose from a foreign call.
     27
     28 * Foreign calls will be able to specify independently whether they
     29   are concurrent, reentrant, or both.  (syntax and the sense of the annotations are still to be decided, see below).
     30   [[BR]]'''Rationale''':
     31   * these annotations can have a profound impact on performance in some implementations.
     32
     33 * Bound threads are not required, but allowed as an extension, and we
     34   will specify their meaning.
     35
     36------------------------
    437== References ==
    5 
    6 on the wiki:
    7 
    8  * ForeignBlocking
    938
    1039Documentation:
     
    2150
    2251--------------
     52= Old Stuff =
    2353
    24 = Proposal =
     54What follows is old material,  which we will probably want to
     55incorporate into the main text later.
    2556
    26 
    27 == what is required by the standard ==
    28 
    29 At least the following interface will be provided
    30 
    31  * [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent-MVar.html Control.Concurrent.MVar] - everything except {{{addMVarFinalizer}}}
    32  * [http://www.haskell.org/ghc/docs/latest/html/libraries/base/Control-Concurrent.html Control.Concurrent] - {{{ThreadId}}}, {{{myThreadId}}}, {{{forkIO}}}, {{{yield}}}, {{{sleep}}} (replaces {{{threadDelay}}}).
    33  * {{{Control.Concurrent.Chan}}}, {{{Control.Concurrent.QSem}}}, {{{Control.Concurrent.QSemN}}},
    34    {{{Control.Concurrent.SampleVar}}}
    35 
    36 the FFI must be able to handle 'concurrent nonrentrant' imports, but not
    37 necessarily 'concurrent reentrant' ones.
    3857
    3958== Progress Guarentee ==