Changes between Version 76 and Version 77 of LightweightConcurrency


Ignore:
Timestamp:
May 22, 2012 7:23:30 PM (2 years ago)
Author:
kc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LightweightConcurrency

    v76 v77  
    6565=== One-shot Continuations === 
    6666 
    67 The concurrency substrate enables creation and scheduling of I/O-performing computations through ''one-shot continuations''. An SCont (stack continuation) is a suspended I/O computation, which is in fact just a reference to a TSO object. Capturing the current continuation is just getting a reference to the current TSO, and hence is very fast. SCont interface is shown below: 
     67The concurrency substrate enables creation and scheduling of I/O-performing computations through ''one-shot continuations''. An SCont (stack continuation) is a suspended I/O computation, which is in fact just a reference to a TSO object. Capturing the current continuation is just getting a reference to the current TSO, and hence is very fast. In the following discussion, we use SConts when referring to the Haskell object and threads when referring to its corresponding RTS version. SCont interface is shown below: 
    6868 
    6969{{{ 
     
    342342=== Blocked Indefinitely === 
    343343 
     344==== Unreachable Concurrent Datastructure ==== 
     345 
     346The [http://hackage.haskell.org/packages/archive/base/latest/doc/html/Control-Exception-Base.html#t:BlockedIndefinitelyOnMVar BlockedIndefinitelyOnMVar] is raised on a thread that is blocked on an MVar, but the MVar has become unreachable. This is performed at the end of a garbage collection, just before resuming execution of the Haskell threads. In the vanilla RTS, after raising BlockedIndefinitelyOnMVar exception on a blocked thread, the thread is added back to the run queue. However, in the lightweight concurrency implementation, this is not so straightforward. In particular, ''How do we know whether the SCont 
     347 
     348==== Unreachable Scheduler ==== 
    344349 
    345350