Re: [go-nuts] what is //go:build difference from //+build?

2022-06-15 Thread Kurtis Rader
See https://stackoverflow.com/questions/68360688/whats-the-difference-between-gobuild-and-build-directives not to mention many other answers to your question. I don't understand your question. Languages like Go, and their associated tools, evolve. In this case the people improving Go decided that a

[go-nuts] Re: what is //go:build difference from //+build?

2022-06-15 Thread Holloway Kean Ho
They are build-constraints for cross platform support. Doc: https://pkg.go.dev/cmd/go#hdr-Build_constraints I believe to-date is only using go:build. +build was for Go 1.16 and before so only use that if you plans to support legacy compiler. On Thursday, June 16, 2022 at 10:37:16 AM UTC+8 cuiw.

[go-nuts] what is //go:build difference from //+build?

2022-06-15 Thread xie cui
about when these feature add to golang? and is all we can do with //go:build can do with //+build, and vice versa? -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to

[go-nuts] Re: Making concurrent programs to run parallely in Go

2022-06-15 Thread Brian Candler
As I understand, it will execute in parallel by default. There's a pool of threads for running goroutines, defaulting initially to the number of cores. If a syscall blocks, then other threads will continue to run - and (I think) an extra thread is started too. > But still I had to use sync.Wai

[go-nuts] Making concurrent programs to run parallely in Go

2022-06-15 Thread Abeshek R
Hi, I'm trying to make a key-value store like LevelDB from scratch for learning about database internals. I got stuck in a place where I need to flush some data to disk file parallely while the main thread is executing reads and writes. I tried writing it as a go-routine but as I understand it,