Repository navigation
Conversation
This was referenced Oct 28, 2026
moetemp
force-pushed
the
moe/up/resource-close
branch
from
October 29, 2026 04:00
db96631 to
4f19dc9
Compare
moetemp
force-pushed
the
moe/up/poll-items
branch
from
October 29, 2026 04:00
d966e69 to
0ddb556
Compare
moetemp
force-pushed
the
moe/up/resource-close
branch
from
October 31, 2026 13:08
4f19dc9 to
db18952
Compare
moetemp
force-pushed
the
moe/up/poll-items
branch
from
October 31, 2026 13:08
0ddb556 to
7ae8cea
Compare
moetemp
force-pushed
the
moe/up/poll-items
branch
from
November 3, 2026 15:22
7ae8cea to
bfee66d
Compare
moetemp
force-pushed
the
moe/up/resource-close
branch
2 times, most recently
from
November 4, 2026 09:34
99765ef to
7e9445a
Compare
moetemp
changed the base branch from
moe/up/poll-items
to
moe/up/varargs-unwrap-result-field
November 4, 2026 09:35
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
from
November 5, 2026 05:19
00292fd to
e3ee76c
Compare
moetemp
force-pushed
the
moe/up/resource-close
branch
2 times, most recently
from
November 5, 2026 07:27
5b9ed4e to
95b18f5
Compare
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
from
November 5, 2026 07:27
e3ee76c to
08c1907
Compare
`@nexus.close` marks the method that ends a resource. Python closes it at a block's end, and a call that returns it returns a `ResourceCall` that nexgen emits.
moetemp
force-pushed
the
moe/up/resource-close
branch
from
November 5, 2026 22:22
95b18f5 to
c7e5e39
Compare
moetemp
force-pushed
the
moe/up/varargs-unwrap-result-field
branch
from
November 5, 2026 22:22
08c1907 to
6b54092
Compare
Owner
Author
|
Moved to temporalio#369, on |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
This PR adds
@nexus.close, which marks the method that ends a resource, soasync withcloses it.__aenter__and__aexit__. At the end of the block,_support.exit_close(self, exc)decides if it closes. The close method's parameters must be optional, since the block's end passes none.ResourceCall, which nexgen writes in_resource_call.py. Soawait client.create_stream(...)andasync with client.create_stream(...)both work.TypeScript and .NET get
[Symbol.asyncDispose]andIAsyncDisposablein a follow-up PR.Why?
The proposal creates a Stream in
async with, and the end of the block closes it. A close carries no value. The support package decides the policy, since Workflow code can keep a Stream open for a retry run.How did you test it?
Link to a test plan if any -
Python tests close a Stream after a clean, a failed and a canceled block. A Workflow block leaves the close to the run.