úÎdý     $This stores all pool-related states List of worker threads ;For each worker thread: is it running some task currently? Queue of tasks Should pool return tasks' results? Queue of tasks'. results (not used if returnResults == False) Number of last task Are all tasks done? <Numbers of done tasks; not used when returnResults == False 1Any monadic computation that can be turned to IO !Run the task with given argument Create new threads pool Number of threads in the pool Should pool return tasks' results? $Create new threads pool in IO monad Number of threads in the pool Should pool return tasks' results? (Set state of current thread in the pool Worker thread itself States of all threads !Channel where to read tasks from Send results to output queue? "Channel where to write results to List of done tasks 'Check if pool is waiting for new tasks  The pool Put the new task into queue Pool of threads Task (monadic computation) Argument for that computation %Returns a number of task in the pool .Tell to the pool that there will no new tasks ;Tell to the pool that there will no new tasks, in IO monad  Read next result from the pool. : This makes sense only if for pool which returns results. Pool Returns (number of task, task' s result) @Read all results from pool and run given computation with each. C Probably you will run this in the separate thread (using forkIO). : This makes sense only if for pool which returns results. Wait until all tasks will end +Wait until all tasks will end, in IO monad "Terminate all threads in the pool /Terminate all threads in the pool, in IO monad         threads-pool-0.1Control.Concurrent.PoolPoolTaskrunTasknewPool newPoolIO isPoolWaitingqueue noMoreTasks noMoreTasksIO readResult resultsReaderwaitFor waitForIO waitForTasks terminatePoolterminatePoolIO poolThreads threadsStates poolQueue returnResults poolResults poolLastTaskpoolDone doneTasks setMyStateworker