Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 324 Bytes

File metadata and controls

21 lines (15 loc) · 324 Bytes

Question

Please use three goroutines to run 10 times each, and output cat, dog, bird in order

  1. goroutine 01 -> println("cat")
  2. goroutine 02 -> println("dog")
  3. goroutine 03 -> println("bird")

output:

cat
dog
bird
cat
...

solution 01

use unbuffered channel. see the example.