
10 Aug
2011
10 Aug
'11
1:07 a.m.
Hello,
replace the MVar handle with an IORef [Data.Sequence.Seq String] logs are appended with atomicModifyIORef then every n seconds, a worker thread uses atomicModifyIORef to clear the sequence and write the log messages to a handle?
this way, logging a message doesn't require taking an mvar
It would be faster. But we need to implement a special flush system for process termination. I will try to implement if time allows. --Kazu