[go-nuts] Re: File method WriteString frequent calls led to a large system cache

2016-06-29 Thread Hotei
Just guessing, but these solutions come to mind. Here's some pseudocode for what I think Tamás was trying to say... var x sync.Mutex for { sleep(24 hours) x.Lock() write/start a new daily log x.Unlock() } or get a delay by selecting on a channel something like this select { case <-time.After

[go-nuts] Re: File method WriteString frequent calls led to a large system cache

2016-06-29 Thread Wei Feng
Can you say it in more detail? Thinks. 在 2016年6月28日星期二 UTC+8下午12:23:28,Tamás Gulácsi写道: > > Don't Stat on every log line, but use some other mechanism (mutex, > channel) to rotate the logs every day. -- You received this message because you are subscribed to the Google Groups "golang-nuts" gro