aivika-transformers-6.1: Transformers for the Aivika simulation library
CopyrightCopyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.Trans.Processor.RoundRobbin

Description

Tested with: GHC 8.0.1

The module defines the Round-Robbin processor.

Synopsis

Documentation

roundRobbinProcessor :: MonadDES m => Processor m (Process m Double, Process m a) a Source #

Represents the Round-Robbin processor that tries to perform the task within the specified timeout. If the task times out, then it is canceled and returned to the processor again; otherwise, the successful result is redirected to output.

roundRobbinProcessorUsingIds :: MonadDES m => Processor m (Process m (Double, ProcessId m), Process m a) a Source #

Like roundRobbinProcessor but allows specifying the process identifiers which must be unique for every new attemp to perform the task even if the task is the same.