Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/simonrichardson/gexec
Group execution modelling...
https://github.com/simonrichardson/gexec
execution gorountines interruptions meshuggah
Last synced: 21 days ago
JSON representation
Group execution modelling...
- Host: GitHub
- URL: https://github.com/simonrichardson/gexec
- Owner: SimonRichardson
- License: apache-2.0
- Created: 2017-06-12T15:09:43.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-26T20:57:37.000Z (about 7 years ago)
- Last Synced: 2024-10-15T21:36:59.831Z (2 months ago)
- Topics: execution, gorountines, interruptions, meshuggah
- Language: Go
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Gexec
Gexec originates from [oklog](https://github.com/oklog/oklog/tree/master/pkg/group)
where it was originally made and designed by [Peter Bourgon](https://github.com/peterbourgon).
The library was extracted so that it can be used as an independent library
without having to bring in more dependencies than required.At some point additions have been made, but the core has remained the same.
## Examples
For more detailed examples [see](/example_test.go)
```go
var g gexec.Group
{
listener, := net.Listen("tcp", ":0")
g.Add(func() error {
return http.Serve(listener, http.NewServeMux())
}, func(err error) {
listener.Close()
})
}
// Execute the group
fmt.Println(g.Run())
```