You could simplify your program by removing the go statement. There is no
concurrency if one goroutine hands one piece work off to another then sleeps
for the result; it's simpler to just do the work yourself.
--
You received this message because you are subscribed to the Google Groups
"golan
Great. Thank you. I fixed it by adding a second channel to indicate worker
success.
On Friday, August 5, 2016 at 3:47:09 PM UTC-7, Dave Cheney wrote:
>
> Your program exits because the channel is buffered, so the main goroutine
> exits immediately once it has sent the value to the channel. Once
Your program exits because the channel is buffered, so the main goroutine
exits immediately once it has sent the value to the channel. Once the main
goroutine returns, the program will exit.
On Saturday, 6 August 2016 08:38:54 UTC+10, Jon Strauss wrote:
>
> Hello,
> I have the following code:
>
Please check your errors.
On Saturday, 6 August 2016 08:38:54 UTC+10, Jon Strauss wrote:
>
> Hello,
> I have the following code:
>
> package main
>
> import "fmt"
> import "encoding/hex"
> import "os"
>
> func main() {
>var bytes []byte
>var channel chan []byte
>
>file,_ :=