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, the go-routine (for flushing data to disk) starts executing but blocks at file write and switches back to main go-routine.
When I tried to print how many cores go runtime was using with runtime.NumCPU(), I got 12 as the result. But still I had to use sync.WaitGroup to actually make the main go-routine wait before this file write happens. I'm relatively new to writing concurrent programs in Go. Is there any way to make it execute paralley? Thanks -- 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 golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/51dd50f1-635c-4b76-a6c8-1a5f87fcf4edn%40googlegroups.com.