Open Groxx opened 6 years ago
I've faced with the same issue and came to the same conclusions. Workaround it with
newFuture, settable := workflow.NewFuture(ctx)
...........................
selector.AddFuture(newFuture, func(f workflow.Future) {.......})
...........................
var value interface{}
err := future.Get(ctx, &value)
if err != nil {
settable.SetError(err)
} else {
settable.SetValue(value)
}
...........................
selector.AddFuture()
Do you have plans to fix it? or if you are able to confirm that it is really source of problem I can prepare pull request that fixes the problem.
If you comment out one of those two, you can see that async passes ~immediately, while sync times out.
Cause appears to be that the
IsReady
branch doesn't close the related channel? https://github.com/uber-go/cadence-client/blob/9c4380588cc1452dc0e84d672cb1f3dd758ae67a/internal/internal_workflow.go#L329Compare to e.g. Set: