-
Notifications
You must be signed in to change notification settings - Fork 790
added manger to wait for go routines to finish #2869
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
Merged
sanketsudake
merged 3 commits into
fission:main
from
vardhaman-surana:add-go-routine-manager
Nov 7, 2023
Merged
added manger to wait for go routines to finish #2869
sanketsudake
merged 3 commits into
fission:main
from
vardhaman-surana:add-go-routine-manager
Nov 7, 2023
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #2869 +/- ##
==========================================
+ Coverage 22.87% 23.02% +0.14%
==========================================
Files 83 84 +1
Lines 10801 10834 +33
==========================================
+ Hits 2471 2494 +23
- Misses 8147 8156 +9
- Partials 183 184 +1
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 1 file with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
sanketsudake
reviewed
Nov 7, 2023
sanketsudake
reviewed
Nov 7, 2023
renamed Manafer to Interface and GoRoutineManager to GroupManager replaced some go routine calls with manager Add func
sanketsudake
approved these changes
Nov 7, 2023
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
right now ctx.Done() is being used to ensure that we pass the cancellation signal to all the go routines but there is no mechanism to wait for the completion of all the running go routines.
This PR adds a manager which can be used to wait for go routines to be finished when context is cancelled.
manager's Add function can be used to start a go routine and then at the end when the context is cancelled manager's Wait function can be used to wait for the go routine to finish.
Which issue(s) this PR fixes:
Fixes #
Testing
Checklist: