-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add parallel steps #51
Conversation
15d5a0e
to
d072f8d
Compare
|
||
results := []Result{} | ||
isPlanned := false | ||
ch := make(chan struct{}, 1) |
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.
Is this used as a waitgroup?
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.
It's effectively a waitgroup of 1. We want to run each step sequentially but also in a goroutine so that we can recover the control hijack
experimental/group/group.go
Outdated
// TODO: What to do here? | ||
fmt.Println("TODO") |
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 just repanic for now? I suppose this might be where we capture the non-Inngest panic and could return it as an error to Inngest in the future?
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.
Do you think we should recover the panic and repanic it outside the goroutine? I think that'll let our normal non-control-flow panic recovery logic work
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.
Ooh yeah if we already have something that captures panics then that'd be awesome.
Description
Add parallel steps using a new
group.Parallel
function. The newgroup
package lives in anexperimental
directory, where it will remain until we feel it's stable.