https://github.com/romshark/tmdwg-go
A timed analogue of sync.WaitGroup for Golang
https://github.com/romshark/tmdwg-go
Last synced: 6 months ago
JSON representation
A timed analogue of sync.WaitGroup for Golang
- Host: GitHub
- URL: https://github.com/romshark/tmdwg-go
- Owner: romshark
- License: mit
- Created: 2018-05-12T14:50:05.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-01T14:15:19.000Z (8 months ago)
- Last Synced: 2025-04-01T08:03:07.253Z (6 months ago)
- Language: Go
- Size: 9.77 KB
- Stars: 4
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://opensource.org/licenses/MIT)
[](https://coveralls.io/github/romshark/tmdwg-go?branch=master)
[](https://goreportcard.com/report/github.com/romshark/tmdwg-go)# Timed WaitGroup for Go
[tmdwg-go](https://github.com/romshark/tmdwg-go) provides a **timed wait group** implementation similar to **[sync.WaitGroup](https://golang.org/pkg/sync/#WaitGroup)**.
It's purpose is simple: it blocks all goroutines that called it's `wg.Wait()` method and frees them when:
- either the timeout is reached...
- or the progress is reachedIn case the timeout was reached before the progress `wg.Wait()` will return a timeout error, otherwise it'll return `nil`.
The timed wait group is fully thread safe and may safely be used concurrently from within multiple goroutines.
🧟♂️ Written in May 2018, revived in October 2024.