Wire the async source runtimes into the hosts - #4392
Conversation
There was a problem hiding this comment.
All reported issues were addressed across 6 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
273fe09 to
e3aa32b
Compare
2e15ff3 to
167d733
Compare
Performance Benchmark Results
|
Performance Benchmark Results
|
Performance Benchmark Results
|
There was a problem hiding this comment.
1 issue found across 5 files (changes from recent commits).
Confidence score: 5/5
- In
editor/src/node_graph_executor/runtime.rsandnode-graph/graphene-cli/src/main.rs, duplicatedpoll_once/runtime.enter/runtime.spawnlogic inTokioSpawnerraises maintenance risk: future fixes could land in one path but not the other, causing subtle editor-vs-CLI behavior drift—extract this into a shared helper/module to keep execution semantics aligned.
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="editor/src/node_graph_executor/runtime.rs">
<violation number="1" location="editor/src/node_graph_executor/runtime.rs:148">
P3: The TokioSpawner now duplicates identical `poll_once` + `runtime.enter` + `runtime.spawn` logic in both the editor (editor/src/node_graph_executor/runtime.rs) and the CLI (node-graph/graphene-cli/src/main.rs). Since these do the same thing, consider extracting a shared host spawner (e.g. in graphene_std runtime) so the inline-poll behavior stays in one place and can't drift between the two hosts.</violation>
</file>
Tip: Review your code locally with the cubic CLI to iterate faster.
Re-trigger cubic
| fn spawn(&self, mut task: SourceFuture) -> bool { | ||
| let runtime = self.0.as_ref().expect("runtime lives until drop"); | ||
| let _guard = runtime.enter(); | ||
| if poll_once(&mut task) { |
There was a problem hiding this comment.
P3: The TokioSpawner now duplicates identical poll_once + runtime.enter + runtime.spawn logic in both the editor (editor/src/node_graph_executor/runtime.rs) and the CLI (node-graph/graphene-cli/src/main.rs). Since these do the same thing, consider extracting a shared host spawner (e.g. in graphene_std runtime) so the inline-poll behavior stays in one place and can't drift between the two hosts.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At editor/src/node_graph_executor/runtime.rs, line 148:
<comment>The TokioSpawner now duplicates identical `poll_once` + `runtime.enter` + `runtime.spawn` logic in both the editor (editor/src/node_graph_executor/runtime.rs) and the CLI (node-graph/graphene-cli/src/main.rs). Since these do the same thing, consider extracting a shared host spawner (e.g. in graphene_std runtime) so the inline-poll behavior stays in one place and can't drift between the two hosts.</comment>
<file context>
@@ -142,8 +142,14 @@ impl Default for TokioSpawner {
+ fn spawn(&self, mut task: SourceFuture) -> bool {
+ let runtime = self.0.as_ref().expect("runtime lives until drop");
+ let _guard = runtime.enter();
+ if poll_once(&mut task) {
+ return true;
+ }
</file context>
Performance Benchmark Results
|
No description provided.