Go 1.9 is released
blog.golang.org
Go 1.9 is released
1–10 of 131 posts
Re: Go 1.9 is released
#21. runtime/pprof package now include symbol information
2. Concurrent Map
3. Profiler Labels
4. database/sql reuse of cached statements
5. The os package now uses the internal runtime poller for file I/O.
Re: Go 1.9 is released
#3So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?
Re: Go 1.9 is released
#4 func testServer(t *testing.T, port int) {
...do stuff...
if err != nil { t.Fatalf("failed to start server: %+v", err) }
}
similarly you can have func assertMapEquals(t *testing.T, a, b map[string]int)
It lets you hide such helper methods from the test failure's stack trace (where t.Fatal is actually called), making test errors more readable.Re: Go 1.9 is released
#5So this new concurrent map? Am I right in understanding it's designed for cases where you have a map shared between goroutines but where each goroutine essentially owns some subset of the keys in the map? So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?
Re: Go 1.9 is released
#6So this new concurrent map? Am I right in understanding it's designed for cases where you have a map shared between goroutines but where each goroutine essentially owns some subset of the keys in the map? So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?
fatal error: concurrent map writesRe: Go 1.9 is released
#7I see there's (more) parallel compilation in 1.9 - so that should improve elapsed time (but not reduce cpu time) of compilation.
Would be nice to know if 1.9 is (still) on track catch up to/pass 1.4.
[1] https://dave.cheney.net/2016/11/19/go-1-8-toolchain-improvem...
Re: Go 1.9 is released
#8So this new concurrent map? Am I right in understanding it's designed for cases where you have a map shared between goroutines but where each goroutine essentially owns some subset of the keys in the map? So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?
With those constraints, why not create a small map for each goroutine at that point, and merge the maps afterwards?
Re: Go 1.9 is released
#9Re: Go 1.9 is released
#10So this new concurrent map? Am I right in understanding it's designed for cases where you have a map shared between goroutines but where each goroutine essentially owns some subset of the keys in the map? So basically it's designed for cases like 'I have N goroutines and each one owns 1/N keys'?
It could just be one map shared by many goroutines, which normally causes a panic: fatal error: concurrent map writes
I did a big rewrite of a current project, and clearly it was badly designed :(