This library provides a simple interface to output status messages from more than one thread.
It will continue adding information (such as dots, or done) to the correct line corresponding to the issuing thread and continue scrolling when a line is done.
- data ConcurrentOutput
- startConcurrentOutput :: IO ConcurrentOutput
- writeConcurrent :: ConcurrentOutput -> String -> IO ()
- writeConcurrentDone :: ConcurrentOutput -> String -> IO ()
Documentation
data ConcurrentOutput Source
startConcurrentOutput :: IO ConcurrentOutputSource
Starts the thread responsible for gathering and formatting the outputs.
You can not kill this thread, so only start one for your application.
writeConcurrent :: ConcurrentOutput -> String -> IO ()Source
Begin a new line of output for your thread or, if there already is one, append to it.
Do not put newline characters in there, or it will break the output. This will also happen if your total line will be wider than the terminal.
writeConcurrentDone :: ConcurrentOutput -> String -> IO ()Source
Finish your line of output with the given string.
Do not put newline characters in there, or it will break the output. This will also happen if your total line will be wider than the terminal.