Add "Waiting For Goroutines To Finish" example.

Also link to it from the Channel Synchronization example
This commit is contained in:
Eli Bendersky
2019-05-29 06:01:58 -07:00
parent c43c319d26
commit 6ab81bdf71
9 changed files with 298 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
// We can use channels to synchronize execution
// across goroutines. Here's an example of using a
// blocking receive to wait for a goroutine to finish.
// When waiting for multiple goroutines to finish,
// you may prefer to [use a WaitGroup](waiting-for-goroutines-to-finish).
package main