Hi all, i'am just learning Go and goroutines, I have three goroutines
(main, producer, consumer) and I dont know how synchronize producer and
consumer for print one value at time, the output that I want is

Producer 0
Consumer 0
Producer 1
Consumer 1
......
but the output of my program it's diferent.

the program:

[image: image.png]

The output:

[image: image.png]

Sorry about my english

Regards

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to