-
Notifications
You must be signed in to change notification settings - Fork 432
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
feat(sdk): restart goroutines #5821
Conversation
Signed-off-by: francois samin <[email protected]>
CDS Report build-all-cds#16031.0 ✘
|
// GoRoutines contains list of routines that have to stay up | ||
type GoRoutines struct { | ||
mutex sync.Mutex | ||
status map[string]bool | ||
status []*GoRoutine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep the mutex to protect the status slice ? In case Run is called by multiple routines ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
sdk/goroutine.go
Outdated
return | ||
case <-t.C: | ||
for _, g := range m.status { | ||
if !g.Active { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !g.Active { | |
if !g.Active && g.Restart { |
CDS Report build-all-cds#16043.0 ✘
|
Signed-off-by: francois samin <[email protected]>
CDS Report build-all-cds#16049.0 ✘
|
SonarCloud Quality Gate failed. |
Signed-off-by: francois samin [email protected]