feat: Add GraphRunner API to replace legacy run method.#207
Merged
griffinmilsap merged 3 commits intodevfrom Jan 21, 2026
Merged
feat: Add GraphRunner API to replace legacy run method.#207griffinmilsap merged 3 commits intodevfrom
griffinmilsap merged 3 commits intodevfrom
Conversation
Collaborator
|
The awful code that this refactor replaced was properly handling a lot of terrible edge cases relating to the way interrupts percolate to threads and child subprocesses across Win/Mac/Linux. There are currently two important regressions we have to fix before this can get merged. These regressions do not appear in the unit tests because they require signal injection into a running system and I'm not sure how to automate a test like that. Regressions I've noticed so far:
|
Collaborator
|
I've sorted out the issue with the Windows shutdown regression. There's still an issue (unrelated to this PR) with unreliable termination of software that makes use of |
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.
Currently, ezmsg systems written with the high level API (units, collections, etc) are run with
ez.runwhich is a synchronous blocking run function. Wouldn't it be neat if we had a non-blocking run function too?Enter
GraphRunner. This new feature allows users to create a GraphRunner object and call either a blocking or non-blocking run!Are you working on a software that orchestrates a bunch of subgraphs that all run on the same graph server? GraphRunner is your friend and gives you a nice handle to start and programmatically stop (!) your ezmsg systems.
Did you start your graph without a GraphServer running on the canonical ezmsg port, and now your system is running on a "sandboxed" random port? Still want to add more stuff to it? You're in luck, because GraphRunner makes the graph's address available as a property!
All silliness aside, this feature represents a refactor of some pretty gnarly code that has existed in ezmsg since public release.
ezmsg/src/ezmsg/core/backend.py
Lines 227 to 228 in eaf8068