Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

create a wait group wrapper #35

Closed
plastikfan opened this issue Aug 24, 2023 · 0 comments · Fixed by #36
Closed

create a wait group wrapper #35

plastikfan opened this issue Aug 24, 2023 · 0 comments · Fixed by #36
Assignees
Labels
feature New feature or request

Comments

@plastikfan
Copy link
Contributor

plastikfan commented Aug 24, 2023

working with waitgroup when a app has a synchronisation bug such as deadlock is difficult because there is no way to track the Add's and the Done()'s.

So create a wrapper that enables keeping track of the counter and enable the client to pass in a string that represents the go routine that is invoking it.

Actually, we should define 3 interfaces, one that carries the Add() method, another that takes the Done() method and another for the Wait() method. This way we can be sure that only the appropriate functionality can be invoked by go routines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant