-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | A networked event handling framework for hooking into other programs. -- -- Pup-Events is a networking enabled event handling framework. This -- package contains the Priority Queue implementation used in the -- Pup-Events-Client and Pup-Events-Server packages. @package Pup-Events-PQueue @version 1.0 -- | Implements Priority Queues intended to be used with the STM module. module PupEventsPQueue -- | Returns an empty PQueue with the specified number of priority levels. makeQueues :: Int -> IO (PQueue a) -- | Recursively tries to read each priority level until it finds -- something. If it can't find any events it returns Nothing. Call using -- atomically $ getThing pqueue. getThing :: PQueue a -> STM (Maybe a) -- | Writes the given something to the given PQueue at the specified -- priority level. It does some checking to make sure we have a valid -- priority level. Call using atomically $ writeThing pqueue priority -- thing. writeThing :: PQueue a -> Int -> a -> STM () -- | A simple alias so we have pretty types. type PQueue a = [TChan a]