Initial (simple) Threading Model + UI + Auxiliary Fixes - #506
Open
ArielG-NV wants to merge 5 commits into
Open
Conversation
Adding simple threading change: - only two threads: application-thread == io-thead == ui-thread && model-thread - Hoist free floating presentation logic into manager that fits in ISession; Event managment is in an EventBuffer object as well rather than freely floating in run_session logic - clean up keyboard state missing implementation logic - fix webrtc bug that caused it to fail on msft edge - adjust webrtc logic so that when waiting for startup... we see a nice ui telling us what happened - added imgui demos - seperated benchmarking from Mp4 output sink so that we can record metrics after model-thread processing (individually from emitting final frame result which comes from ui-thread -- which will eventually have its own metrics as well!) - Added threading API & modified ISession API around the changes described above. This means adding docs & adjusting AGENTS.md slightly as well. - Added utility ImGUIThread for users to use for simple "just run with it" UI support via our UIThread system.
Contributor
Greptile SummaryThe PR introduces a two-thread runtime model, moving model generation to a worker thread while the calling thread manages UI, input, presentation, and output lifecycle.
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains; the previously reported benchmark sample-loss issue is resolved, and the MP4 redraw concern was acknowledged as intentional behavior. Important Files Changed
Sequence DiagramsequenceDiagram
participant UI as UI/Application Thread
participant Events as EventBuffer
participant Model as Model Thread
participant Metrics as Metrics Sink
participant Buffer as PresentationManager
participant Window as Client Window
UI->>Window: Collect user input
UI->>Events: Append events
Model->>Events: Read unread events
Model->>Model: Run model step
Model->>Buffer: Publish model results
Model->>Metrics: Write per-channel metrics
UI->>Buffer: Advance presented frame
UI->>UI: Run UI step
UI->>Window: Write rendered result
Reviews (6): Last reviewed commit: "ad opengl to runner workfow install scri..." | Re-trigger Greptile |
Collaborator
Author
|
/ok to test ff71a57 |
ArielG-NV
force-pushed
the
refactor-api-v2/adding-ui-simple
branch
from
August 24, 2026 03:35
a2154dc to
883f9ff
Compare
Collaborator
Author
|
/ok to test 6fba61b |
ArielG-NV
force-pushed
the
refactor-api-v2/adding-ui-simple
branch
from
August 24, 2026 04:13
6fba61b to
d98a279
Compare
Collaborator
Author
|
/ok to test a2048da |
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.
Resolves: #503
Resolves: #468
Primary Changes: