Skip to content
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

Spawn update coro directly through dispatcher #885

Merged
merged 1 commit into from
Aug 19, 2022
Merged

Spawn update coro directly through dispatcher #885

merged 1 commit into from
Aug 19, 2022

Conversation

mmcshane
Copy link
Contributor

What was changed

Spawn update coro directly through dispatcher

Why?

Calling Go/GoNamed with a context from outside the workflow will fail
because the context doesn't have a handle to dispatcher state.

Checklist

  1. Closes

n/a

  1. How was this tested:

Defect found via sdk-features test for update which will land soon

  1. Any docs updates needed?

No

Calling Go/GoNamed with a context from outside the workflow will fail
because the context doesn't have a handle to dispatcher state.
Copy link
Member

@cretz cretz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense. Technically could have used the root context to start the go named I think, but I think direct dispatcher coroutine creation is the same.

@mmcshane
Copy link
Contributor Author

[...] could have used the root context to start the go named

Do you mean the workflow definition's rootCtx? That's what I was previously using but didn't work. I'd prefer to use GoNamed if you think we can figure out the right Context to use.

@cretz
Copy link
Member

cretz commented Aug 19, 2022

My mistake, I thought rootCtx was the same ctx we gave to the user. Ignore me.

@mmcshane mmcshane merged commit 3d111e3 into temporalio:master Aug 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants