packages feed

Control-Engine 1.0.0.0 → 1.0.0.1

raw patch · 2 files changed

+29/−20 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Control-Engine.cabal view
@@ -1,5 +1,5 @@ name:		Control-Engine-version:	1.0.0.0+version:	1.0.0.1 license:	BSD3 license-file:	LICENSE author:		Thomas DuBuisson <thomas.dubuisson@gmail.com>
Control/Engine.hs view
@@ -11,28 +11,35 @@   queue, placing results on an output queue, but also include hooks, task   injection, and state management. + /1.1 System Figure/+  @-  +--------+  chan1 +------------------------+ chan2  +--------+-  | In Hk  +  --->  | PreMH, Mutator, PostMH | -----> | Out Hk |-  +--------+        +------------------------+        +--------+-       ^                 ^                             ^-       |                 |                             |-       |                 |    IO Ref                   |-       +-----------------+-----------------------------++   One input            Configurable number            One output+   thread               of worker threads              thread+  +--------+  chan1 +------------------------+ chan2  +---------++  | In Hks +  --->  | PreMH, Mutator, PostMH | -----> | Out Hks |+  +--------+        +------------------------+        +---------++       ^                 ^                               ^+       |                 |                               |+       |                 |    Comms via an IO Ref        |+       +-----------------+-------------------------------+                          |                    +------------+                    | State TVar |                    +------------++                   One thread monitoring+                   the TVar and updating+                   the IORef  @ -  /Queues :: (BoundedChan a)/ - from "Control.Concurrent.BoundedChan".+  /2.0 Queues :: (BoundedChan a)/ - from "Control.Concurrent.BoundedChan".    The system uses two primary queues.  One for transporting data from-  pre-mutator hooks to the mutator.  One for data from the mutator to the-  post-mutator hooks.  These channels are size-bounded - which is needed-  mostly due to the inflexibility of the scheduler.+  Input hooks to the mutator (chan1), one for data from the mutator to the+  output hooks (chan2).  These channels are size-bounded - which is needed+  mostly due to the inflexibility of the GHC scheduler. -  /Hooks :: (a -> IO Maybe a)/+  /3.0 Hooks :: (a -> IO Maybe a)/    Hooks can be added and removed during execution without creating a new   engine. They allow the developer to modify tasks:@@ -45,9 +52,17 @@     * Output hooks - post parallization (for sequential post processing) +  A hook returning "Nothing" causes the job or result to be dropped+  (it does not propogate any further). +  /4.0 Injection/++  One injection point allows injection of a result that had no preceding task -+  thus the result is only seen by the output hooks; this uses chan2. Another +  injector allows the input hooks to be bypassed; this uses chan1.  See the+  above figure for channels wrt the hooks and mutator.  -  /State Management/+  /5.0 State Management/    Control-Engine manages state for you.  Semantically, all workers and hooks   will see a correct state but it won't always be the most recent or consistent@@ -63,12 +78,6 @@   contention action while the need for this information will be constant   and performance critical.  How successful this stratagy is has yet to   be shown.- -  /Injection/--  One injection point allows injection of a result that had no preceding task --  thus the result is only seen by the output hooks. Another injector allows the-  input hooks to be bypassed.  -}  module Control.Engine