Skip to content
/ gock Public

Structured concurrency for Go, kind of like Koltin's CoroutineScope or Trio's nurseries.

License

Notifications You must be signed in to change notification settings

tcard/gock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gock Go GoDoc

Package gock (a portmanteau of the go statement and "block") provides structured concurrency utilities for Go.

ctx, cancel := context.WithCancel(ctx)
things := make(chan Thing)

err := gock.Wait(func() error {
	defer close(things)
	return Produce(ctx, things)
}, func() error {
	defer cancel()
	return Consume(things)
})

// Both Produce and Consume are done here, and err is their combined errors.

About

Structured concurrency for Go, kind of like Koltin's CoroutineScope or Trio's nurseries.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages