Changes between Version 15 and Version 16 of LightweightConcurrency


Ignore:
Timestamp:
May 15, 2012 10:28:18 PM (3 years ago)
Author:
kc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • LightweightConcurrency

    v15 v16  
    3636instance Monad PTM
    3737
     38newPVar    :: a -> PTM (PVar a)
     39readPVar   :: PVar a -> PTM a
     40writePVar  :: PVar a -> a -> PTM ()
     41atomically :: PTM a -> IO a
     42}}}
    3843
    39 }}}
     44A PTM transaction may allocate, read and write transactional variables of type `PVar a`. It is important to notice that PTM does not provide a blocking `retry` mechanism. Such a blocking action needs to interact with the scheduler, to block the current thread and resume another thread. We will see [#AbstractSchedulerInterface later] how to allow such interactions while not imposing any restriction on the structure of the schedulers.
    4045
    4146=== Controlling Parallelism ===