Name: PriorityChansConverger
Synopsis:
Read single output from an array of inputs - channels with priorities
Description:
Abbreviation for the @PriorityChansConverger@ is PCC.
.
Based on @STM.TChan@, extended with capacity control.
Wrapped into IO version is also available.
.
When user reads from the PCC, the choice is made - from which channel
to read. System selects a nonempty channel, whose (CurrentPriority,
StartPriority) tuple is max. The side effect of the channel selection
is it's /CurrentPriority/ decrease by one, if it's value becomes
less than one, then the /CurrentPriority/ is set to /StartPriority/.
.
For the main API interface:
.
@import Control.Concurrent.PriorityChansConverger@
.
The realization probably isn't
very fast and isn't good at memory economy, since it uses fresh high
level primitive - STM. It wasn't intended to be used
with millions of channels. But it's max throughput comparing to the
ordinary @Chan@ throughput is to be estimated (will do it in some
future version).
Version: 0.1
category: Concurrency
Author: Andrejs Sisojevs
Maintainer: Andrejs Sisojevs
Copyright: Copyright (c) 2009-2010 Andrejs Sisojevs
License: LGPL
License-file: COPYRIGHT
Stability: experimental
Tested-with: GHC ==6.10.4
Cabal-version: >=1.6
Build-type: Simple
Extra-source-files:
COPYING
COPYRIGHT
doinst.sh
examples/SimplePCCTestEnvironment/SimplePCCTestEnvironment.hs
Build-depends: base ==4.*, containers -any, stm -any
Exposed-modules:
Control.Concurrent.ConcurrentUISupport
Control.Concurrent.STM.TChan.ExtsCommons
Control.Concurrent.STM.TChan.TChanL
Control.Concurrent.STM.TChan.TChanL_
Control.Concurrent.STM.TChan.TChanB
Control.Concurrent.STM.TChan.TChanB_
Control.Concurrent.PriorityChansConverger
Control.Concurrent.PriorityChansConverger.Commons
Control.Concurrent.PriorityChansConverger.PriorityChansConverger
Control.Concurrent.PriorityChansConverger.PriorityChansConvergerSTM
Other-modules:
Data.MyHelpers
Data.MyHelpers_