go-in-practice
go-in-practice copied to clipboard
Repository for Manning Publications Go in Practice
code from example chapter3/closing/okay.go incorrect (fatal error: all goroutines are asleep - deadlock!) https://play.golang.org/p/weIjPZ8oX-p
``` for { buffer := make([]byte, 100000) cBytes, err := part.Read(buffer) if err == io.EOF { break } read = read + int64(cBytes) fmt.Printf("read: %v \n",read ) p = float32(read)...
I'm using go 1.11.2 and 200 nanoseconds is not enough to print the message function message. Increasing it to 1 millisecond should be enough time for the print of message...