Copyright | Copyright (c) 2009-2017 David Sorokin <david.sorokin@gmail.com> |
---|---|
License | BSD3 |
Maintainer | David Sorokin <david.sorokin@gmail.com> |
Stability | experimental |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Tested with: GHC 8.0.1
This module defines an optimised preemptible resource, where
the IO
monad is an instance of MonadResource
.
Orphan instances
MonadResource IO Source # | The |
newResource :: Int -> Simulation IO (Resource IO) Source # newResourceWithMaxCount :: Int -> Maybe Int -> Simulation IO (Resource IO) Source # resourceCount :: Resource IO -> Event IO Int Source # resourceMaxCount :: Resource IO -> Maybe Int Source # requestResourceWithPriority :: Resource IO -> Double -> Process IO () Source # releaseResource :: Resource IO -> Process IO () Source # usingResourceWithPriority :: Resource IO -> Double -> Process IO a -> Process IO a Source # incResourceCount :: Resource IO -> Int -> Event IO () Source # decResourceCount :: Resource IO -> Int -> Event IO () Source # alterResourceCount :: Resource IO -> Int -> Event IO () Source # | |
Eq (Resource IO) Source # | |