scyther-proof-0.3.0: Automatic generation of Isabelle/HOL correctness proofs for security protocols.

Control.Concurrent.ManagedThreads

Synopsis

Documentation

newManager :: IO ThreadManagerSource

Create a new thread manager.

forkManaged :: ThreadManager -> IO () -> IO ThreadIdSource

Create a new managed thread.

getStatus :: ThreadManager -> ThreadId -> IO (Maybe ThreadStatus)Source

Immediately return the status of a managed thread.

waitFor :: ThreadManager -> ThreadId -> IO (Maybe ThreadStatus)Source

Block until a specific managed thread terminates.

waitAll :: ThreadManager -> IO ()Source

Block until all managed threads terminate.

nParSequenceIO :: Int -> [IO a] -> IO [a]Source

Do a parallel sequencing of a list of IO commands using n worker threads and gather their results in a list again.

nParSequenceIO_ :: Int -> [IO a] -> IO ()Source

Do a parallel sequencing of a list of IO commands using n worker threads.

nParMapIO :: Int -> (a -> IO b) -> [a] -> IO [b]Source

Do a parallel map of an IO cmd over a list using n worker threads.

nParMapIO_ :: Int -> (a -> IO b) -> [a] -> IO ()Source

Do a parallel map of an IO cmd over a list using n worker threads while ignoring the results.

nParCmd_ :: Int -> (Int -> Int -> b -> IO ()) -> [Chan b -> IO a] -> IO ()Source

Parallel execution of a command using n worker threads. The channel argument can be used to report exactly one (!) progress value to the display function. NOTE: If the executed command is blocking, then you need to use the threaded runtime

parCmd_ :: (Int -> Int -> b -> IO ()) -> [Chan b -> IO a] -> IO ()Source

Like nParCmd_ but uses the number of processing cores+1 as a default for the number of worker treads. You can change their number by adding to the command line of a program linked with the threaded library: +RTS -Nno-of-cores -RTS