
Hi,
On 2015/07/01 3:33,Jonas Scholl
wrote:
https://hackage.haskell.org/package/silently may be of interest to you. Although I do not now whether it is threadsafe.
Thanks! I didn't know about this package. This package seems great, but after I did some experement, it turns out to be not thread-safe. If we apply capture or silence to time-consuming actions, it eats entire output to stdout even made by other thread. For example, following code does not output anything and captures the output by another thread: ```haskell main :: IO () main = do print =<< (replicateM_ 100 $ do threadDelay (10^5) putStrLn "Hey, I'm here!") `concurrently` (capture_ $ replicateM_ 100 $ do threadDelay (10^5) putStrLn "Hey, You're there!") ``` I'm now suspecting that implementing the thread-safe versions of silently / capture is impossible... -- Hiromi ISHII konn.jinro@gmail.com