-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Task Framework for The Cloud Haskell Application Platform -- -- The Task Framework intends to provide tools for task management, work -- scheduling and distributed task coordination. These capabilities build -- on the Async Framework as well as other tools and libraries. The -- framework is currently a work in progress. The current release -- includes a simple bounded blocking queue implementation only, as an -- example of the kind of capability and API that we intend to produce. @package distributed-process-task @version 0.1.2.2 -- | A simple bounded (size) task queue, which accepts requests and blocks -- the sender until they're completed. The size limit is applied to the -- number of concurrent tasks that are allowed to execute - if the limit -- is 3, then the first three tasks will be executed immediately, but -- further tasks will then be queued (internally) until one or more tasks -- completes and the number of active/running tasks falls within the -- concurrency limit. -- -- Note that the process calling executeTask will be blocked for -- _at least_ the duration of the task itself, regardless of whether or -- not the queue has reached its concurrency limit. This provides a -- simple means to prevent work from being submitted faster than the -- server can handle, at the expense of flexible scheduling. module Control.Distributed.Process.Task.Queue.BlockingQueue data BlockingQueue a -- | Limit for the number of concurrent tasks. type SizeLimit = Int data BlockingQueueStats BlockingQueueStats :: Int -> Int -> Int -> BlockingQueueStats [maxJobs] :: BlockingQueueStats -> Int [activeJobs] :: BlockingQueueStats -> Int [queuedJobs] :: BlockingQueueStats -> Int -- | Start a queue with an upper bound on the # of concurrent tasks. start :: (Serializable a) => Process (InitResult (BlockingQueue a)) -> Process () -- | Define a pool of a given size. pool :: Serializable a => SizeLimit -> Process (InitResult (BlockingQueue a)) -- | Enqueue a task in the pool and block until it is complete. executeTask :: (Addressable s, Serializable a) => s -> Closure (Process a) -> Process (Either ExitReason a) -- | Fetch statistics for a queue. stats :: Addressable s => s -> Process (Maybe BlockingQueueStats) instance GHC.Generics.Selector Control.Distributed.Process.Task.Queue.BlockingQueue.S1_0_2BlockingQueueStats instance GHC.Generics.Selector Control.Distributed.Process.Task.Queue.BlockingQueue.S1_0_1BlockingQueueStats instance GHC.Generics.Selector Control.Distributed.Process.Task.Queue.BlockingQueue.S1_0_0BlockingQueueStats instance GHC.Generics.Constructor Control.Distributed.Process.Task.Queue.BlockingQueue.C1_0BlockingQueueStats instance GHC.Generics.Datatype Control.Distributed.Process.Task.Queue.BlockingQueue.D1BlockingQueueStats instance GHC.Generics.Constructor Control.Distributed.Process.Task.Queue.BlockingQueue.C1_0GetStats instance GHC.Generics.Datatype Control.Distributed.Process.Task.Queue.BlockingQueue.D1GetStats instance GHC.Generics.Generic Control.Distributed.Process.Task.Queue.BlockingQueue.BlockingQueueStats instance GHC.Generics.Generic Control.Distributed.Process.Task.Queue.BlockingQueue.GetStats instance Data.Binary.Class.Binary Control.Distributed.Process.Task.Queue.BlockingQueue.GetStats instance Data.Binary.Class.Binary Control.Distributed.Process.Task.Queue.BlockingQueue.BlockingQueueStats -- | The Task Framework intends to provide tools for task -- management, work scheduling and distributed task coordination. These -- capabilities build on the Execution Framework as well as other -- tools and libraries. The framework is currently a work in progress. -- The current release includes a simple bounded blocking queue -- implementation only, as an example of the kind of capability and API -- that we intend to produce. -- -- The Task Framework will be broken down by the task scheduling -- and management algorithms it provides, e.g., at a low level providing -- work queues, worker pools and the like, whilst at a high level -- allowing the user to choose between work stealing, sharing, -- distributed coordination, user defined sensor based bounds/limits and -- so on. module Control.Distributed.Process.Task