Re: [go-nuts] src/log/log.go: What makes it expensive in this code of log.go?

2016-09-07 Thread Ian Lance Taylor
On Tue, Sep 6, 2016 at 9:00 AM, wrote: > > Hey, It's commented "release lock while getting caller info - it's > expensive" in source code of /src/log/log.go line:150. > > I'm confused with what makes it expensive if we didn't unlock the l.mu ? > Does goroutines have context ? As the comment sugg

[go-nuts] src/log/log.go: What makes it expensive in this code of log.go?

2016-09-06 Thread mworks092
Hey, It's commented "release lock while getting caller info - it's expensive" in source code of /src/log/log.go line:150. I'm confused with what makes it expensive if we didn't unlock the l.mu ? Does goroutines have context ? func (l *Logger) Output(calldepth int, s string) error { now :=