The PriorityChansConverger package

[Tags: lgpl, library]

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).


Properties

Version0.1
Dependenciesbase (==4.*), containers, stm
LicenseLGPL
CopyrightCopyright (c) 2009-2010 Andrejs Sisojevs
AuthorAndrejs Sisojevs <andrejs.sisojevs@nextmail.ru>
MaintainerAndrejs Sisojevs <andrejs.sisojevs@nextmail.ru>
Stabilityexperimental
CategoryConcurrency
Upload dateSun Jan 3 07:02:58 UTC 2010
Uploaded byAndreySisoyev
Downloads110 total (12 in last 30 days)

Modules

[Index]

Downloads

Maintainers' corner

For package maintainers and hackage trustees