Skip to content
/ gwait Public

A simple utility to de-duplicate the job of waiting for goroutines to close

License

Notifications You must be signed in to change notification settings

piersy/gwait

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gwait

A simple utility to de-duplicate the job of waiting for goroutines to close

	w := gwait.NewWaiter()

	// Run function in a goroutine
	w.Go(func() {
		// do something
	})

	// Run another function in a goroutine
	w.Go(func() {
		// do something else
	})

	// Ensure we wait for the goroutines to complete
	w.Wait()

About

A simple utility to de-duplicate the job of waiting for goroutines to close

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages