aivika-realtime-0.4: Soft real-time simulation module for the Aivika library
CopyrightCopyright (c) 2016-2017 David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellSafe-Inferred
LanguageHaskell2010

Simulation.Aivika.RealTime.QueueStrategy

Description

Tested with: GHC 8.0.1

This module defines some queue strategy instances for the RT computations.

Orphan instances

(DequeueStrategy (RT m) FCFS, MonadComp m, MonadIO m) => DeletingQueueStrategy (RT m) FCFS Source #

An implementation of the FCFS queue strategy.

Instance details

Methods

strategyQueueDelete :: Eq a => StrategyQueue (RT m) FCFS a -> a -> Event (RT m) Bool #

strategyQueueDeleteBy :: StrategyQueue (RT m) FCFS a -> (a -> Bool) -> Event (RT m) (Maybe a) #

strategyQueueContains :: Eq a => StrategyQueue (RT m) FCFS a -> a -> Event (RT m) Bool #

strategyQueueContainsBy :: StrategyQueue (RT m) FCFS a -> (a -> Bool) -> Event (RT m) (Maybe a) #

(DequeueStrategy (RT m) LCFS, MonadComp m, MonadIO m) => DeletingQueueStrategy (RT m) LCFS Source #

An implementation of the LCFS queue strategy.

Instance details

Methods

strategyQueueDelete :: Eq a => StrategyQueue (RT m) LCFS a -> a -> Event (RT m) Bool #

strategyQueueDeleteBy :: StrategyQueue (RT m) LCFS a -> (a -> Bool) -> Event (RT m) (Maybe a) #

strategyQueueContains :: Eq a => StrategyQueue (RT m) LCFS a -> a -> Event (RT m) Bool #

strategyQueueContainsBy :: StrategyQueue (RT m) LCFS a -> (a -> Bool) -> Event (RT m) (Maybe a) #

(DequeueStrategy (RT m) SIRO, MonadComp m, MonadIO m) => DeletingQueueStrategy (RT m) SIRO Source #

An implementation of the SIRO queue strategy.

Instance details

Methods

strategyQueueDelete :: Eq a => StrategyQueue (RT m) SIRO a -> a -> Event (RT m) Bool #

strategyQueueDeleteBy :: StrategyQueue (RT m) SIRO a -> (a -> Bool) -> Event (RT m) (Maybe a) #

strategyQueueContains :: Eq a => StrategyQueue (RT m) SIRO a -> a -> Event (RT m) Bool #

strategyQueueContainsBy :: StrategyQueue (RT m) SIRO a -> (a -> Bool) -> Event (RT m) (Maybe a) #

(DequeueStrategy (RT m) StaticPriorities, MonadComp m, MonadIO m) => DeletingQueueStrategy (RT m) StaticPriorities Source #

An implementation of the StaticPriorities queue strategy.

Instance details

(QueueStrategy (RT m) FCFS, MonadComp m, MonadIO m) => DequeueStrategy (RT m) FCFS Source #

An implementation of the FCFS queue strategy.

Instance details

Methods

strategyDequeue :: StrategyQueue (RT m) FCFS a -> Event (RT m) a #

(QueueStrategy (RT m) LCFS, MonadComp m, MonadIO m) => DequeueStrategy (RT m) LCFS Source #

An implementation of the LCFS queue strategy.

Instance details

Methods

strategyDequeue :: StrategyQueue (RT m) LCFS a -> Event (RT m) a #

(QueueStrategy (RT m) SIRO, MonadComp m, MonadIO m) => DequeueStrategy (RT m) SIRO Source #

An implementation of the SIRO queue strategy.

Instance details

Methods

strategyDequeue :: StrategyQueue (RT m) SIRO a -> Event (RT m) a #

(QueueStrategy (RT m) StaticPriorities, MonadComp m, MonadIO m) => DequeueStrategy (RT m) StaticPriorities Source #

An implementation of the StaticPriorities queue strategy.

Instance details

(DequeueStrategy (RT m) FCFS, MonadComp m, MonadIO m) => EnqueueStrategy (RT m) FCFS Source #

An implementation of the FCFS queue strategy.

Instance details

Methods

strategyEnqueue :: StrategyQueue (RT m) FCFS a -> a -> Event (RT m) () #

(DequeueStrategy (RT m) LCFS, MonadComp m, MonadIO m) => EnqueueStrategy (RT m) LCFS Source #

An implementation of the LCFS queue strategy.

Instance details

Methods

strategyEnqueue :: StrategyQueue (RT m) LCFS a -> a -> Event (RT m) () #

(DequeueStrategy (RT m) SIRO, MonadComp m, MonadIO m) => EnqueueStrategy (RT m) SIRO Source #

A template-based implementation of the SIRO queue strategy.

Instance details

Methods

strategyEnqueue :: StrategyQueue (RT m) SIRO a -> a -> Event (RT m) () #

(Monad m, MonadComp m, MonadIO m) => QueueStrategy (RT m) FCFS Source #

An implementation of the FCFS queue strategy.

Instance details

Associated Types

data StrategyQueue (RT m) FCFS :: Type -> Type #

(MonadComp m, MonadIO m) => QueueStrategy (RT m) LCFS Source #

An implementation of the LCFS queue strategy.

Instance details

Associated Types

data StrategyQueue (RT m) LCFS :: Type -> Type #

(MonadComp m, MonadIO m) => QueueStrategy (RT m) SIRO Source #

An implementation of the SIRO queue strategy.

Instance details

Associated Types

data StrategyQueue (RT m) SIRO :: Type -> Type #

(MonadComp m, MonadIO m) => QueueStrategy (RT m) StaticPriorities Source #

An implementation of the StaticPriorities queue strategy.

Instance details

Associated Types

data StrategyQueue (RT m) StaticPriorities :: Type -> Type #

(DequeueStrategy (RT m) StaticPriorities, MonadComp m, MonadIO m) => PriorityQueueStrategy (RT m) StaticPriorities Double Source #

An implementation of the StaticPriorities queue strategy.

Instance details