We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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 convinience method
ReceiveWithTimeout(ctx Context, timeout time.Duration, valuePtr interface{}) (timedOut, more bool)
This would make this frequently used code:
sigCh := workflow.GetSignalChannel(ctx, "signal1") timeout := workflow.NewTimer(ctx, time.Minute * 30) var signal *SignalStruct s := workflow.NewSelector(ctx) s.AddFuture(timeout, func(f Future) { }) s.AddReceive(sigCh, func(c Channel, more bool) { c.Receive(ctx, signal) }) s.Select(ctx)
into
sigCh := workflow.GetSignalChannel(ctx, "signal1") var signal *SignalStruct sigCh.ReceiveWithTimeout(ctx, time.Minute * 30, signal)
The text was updated successfully, but these errors were encountered:
Hi, How about the Channel.Receive, it will be canceled automatically after the workflow timeout?
Sorry, something went wrong.
No branches or pull requests
Add convinience method
This would make this frequently used code:
into
The text was updated successfully, but these errors were encountered: