[web-devel] Caching the System time
Kazu Yamamoto ( 山本和彦 )
kazu at iij.ad.jp
Wed Aug 10 07:07:50 CEST 2011
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
More information about the web-devel
mailing list