aivika-transformers-4.5: Transformers for the Aivika simulation library

CopyrightCopyright (c) 2009-2016, David Sorokin <david.sorokin@gmail.com>
LicenseBSD3
MaintainerDavid Sorokin <david.sorokin@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Simulation.Aivika.IO.Resource.Preemption

Contents

Description

Tested with: GHC 8.0.1

This module defines the preemptible resource, where the MonadIO-based monad can be an instance of MonadResource.

Orphan instances

(Monad m, MonadDES m, MonadIO m, MonadTemplate m) => MonadResource m Source #

The MonadIO based monad is an instance of MonadResource.

Associated Types

data Resource (m :: * -> *) :: * Source #

Methods

newResource :: Int -> Event m (Resource m) Source #

newResourceWithMaxCount :: Int -> Maybe Int -> Event m (Resource m) Source #

resourceCount :: Resource m -> Event m Int Source #

resourceMaxCount :: Resource m -> Maybe Int Source #

resourceCountStats :: Resource m -> Event m (TimingStats Int) Source #

resourceCountChanged :: Resource m -> Signal m Int Source #

resourceCountChanged_ :: Resource m -> Signal m () Source #

resourceUtilisationCount :: Resource m -> Event m Int Source #

resourceUtilisationCountStats :: Resource m -> Event m (TimingStats Int) Source #

resourceUtilisationCountChanged :: Resource m -> Signal m Int Source #

resourceUtilisationCountChanged_ :: Resource m -> Signal m () Source #

resourceQueueCount :: Resource m -> Event m Int Source #

resourceQueueCountStats :: Resource m -> Event m (TimingStats Int) Source #

resourceQueueCountChanged :: Resource m -> Signal m Int Source #

resourceQueueCountChanged_ :: Resource m -> Signal m () Source #

resourceTotalWaitTime :: Resource m -> Event m Double Source #

resourceWaitTime :: Resource m -> Event m (SamplingStats Double) Source #

resourceWaitTimeChanged :: Resource m -> Signal m (SamplingStats Double) Source #

resourceWaitTimeChanged_ :: Resource m -> Signal m () Source #

resourceChanged_ :: Resource m -> Signal m () Source #

requestResourceWithPriority :: Resource m -> Double -> Process m () Source #

releaseResource :: Resource m -> Process m () Source #

usingResourceWithPriority :: Resource m -> Double -> Process m a -> Process m a Source #

incResourceCount :: Resource m -> Int -> Event m () Source #

decResourceCount :: Resource m -> Int -> Event m () Source #

alterResourceCount :: Resource m -> Int -> Event m () Source #

(MonadDES m, MonadIO m, MonadTemplate m) => Eq (Resource m) Source # 

Methods

(==) :: Resource m -> Resource m -> Bool #

(/=) :: Resource m -> Resource m -> Bool #