Examples using... "sync"

Recent
This example fetches several URLs concurrently, using a WaitGroup to block until all the fetches are complete.
A Pool is a set of temporary objects that may be individually saved and retrieved.
Once is an object that will perform exactly one action.
The following example shows how to maintain a scalable frequently read, but infrequently updated data structure using copy-on-write idiom.
Handle registers the handler for the given pattern in the DefaultServeMux. The documentation for ServeMux explains how patterns are matched.
This example shows how to use the producer with separate goroutines reading from the Successes and Errors channels. Note that in order for the Successes channel to be populated, you have to set config.Producer.Return.Successes to true.
DEFLATE is suitable for transmitting compressed data across the network.
To wait for multiple goroutines to finish, we can use a wait group.