Hi,
I’m seeing the following error in my workflow.
trying to block on coroutine which is already blocked, most likely a wrong Context is used to do blocking call (like Future.Get() or Channel.Receive()
My workflow looks something like this.
retryCtx := workflow.WithRetryPolicy(ctx, ...)
for ... {
workflow.Go(ctx, func (ctx workflow.Context) {
err := workflow.ExecuteActivity(retryCtx, ...).Get(retryCtx, nil)
...
})
}
If I replace Get(retryCtx, nil)
with Get(ctx, nil)
, the error goes away.
What does the error mean and why does retryCtx
not work in this case? I guess I haven’t paid much attention to what context is passed to Get()
. I always pass the same context that was passed to ExecuteActivity()
to the Get()
also.