-
Notifications
You must be signed in to change notification settings - Fork 202
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
Async activity Invocation Example in Go #286
base: main
Are you sure you want to change the base?
Conversation
README.md
Outdated
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.
Add this example to the example list
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.
Fixed with a063d6c
err = future.Get(ctx, &res2) | ||
}) | ||
selector.Select(ctx) | ||
selector.Select(ctx) |
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 an err
was reported by the first select, you have swallowed it
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.
Fixed with 7156e31
We already have two samples that cover async activity execution: https://github.com/temporalio/samples-go/tree/main/splitmerge-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.
This use case is already covered by existing samples:
https://github.com/temporalio/samples-go/tree/main/splitmerge-selector
https://github.com/temporalio/samples-go/tree/main/splitmerge-future
Thanks! Didn't know those examples! If this pattern is what match more closely the Java async examples, maybe we can just update the README ? |
What was changed
This adds an example of a non-blocking invocation of two activities in Go, with a behavior coherent with the Java example here
https://github.com/edmondop/samples-java/blob/main/src/main/java/io/temporal/samples/hello/HelloAsync.java#L114
Why?
Checklist
Closes
How was this tested: