-
Notifications
You must be signed in to change notification settings - Fork 1
rmg-core/scheduler: fail-fast drain; u32 radix histogram; keep PendingTx private #121
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
Changes from 8 commits
17ccf77
8b2fa28
607155d
debc4c5
ea1676e
7fc3420
9223f27
b29f168
61499dd
0f704a6
a15d2d7
0ba4a1a
c40f254
50e7ad5
67854d8
cfeeb21
b2b263e
3c17940
677e274
ed44358
dc47543
7f4f6b7
7e74f07
fe64941
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -37,6 +37,10 @@ impl IdSet { | |
| pub fn insert_edge(&mut self, id: &EdgeId) { | ||
| self.0.insert(id.0); | ||
| } | ||
| /// Returns an iterator over the identifiers in the set. | ||
| pub fn iter(&self) -> impl Iterator<Item = &Hash> { | ||
| self.0.iter() | ||
| } | ||
|
Comment on lines
+40
to
+43
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Nice: deterministic iteration exposure for IdSet. Consider also implementing IntoIterator for &IdSet so #[derive(Debug, Clone, Default)]
-pub struct IdSet(BTreeSet<Hash>);
+pub struct IdSet(BTreeSet<Hash>);
+
+impl<'a> IntoIterator for &'a IdSet {
+ type Item = &'a Hash;
+ type IntoIter = std::collections::btree_set::Iter<'a, Hash>;
+ fn into_iter(self) -> Self::IntoIter { self.0.iter() }
+}
🤖 Prompt for AI Agents |
||
| /// Returns true if any element is shared with `other`. | ||
| pub fn intersects(&self, other: &Self) -> bool { | ||
| // Early‑exit by zipping ordered sets. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Portability concern:
opencommand is macOS-specific.Lines 65 and 86 use the
opencommand, which is macOS-specific. On Linux, the equivalent isxdg-open, and on Windows, it'sstart.Consider a portable opener:
Or document the macOS requirement in the target's comment.
Regarding the server lifecycle: the PID management and polling logic look solid. The
nohupredirection correctly discards output, and thefor i in {1..80}loop withcurl -sSfprovides robust readiness checking.🤖 Prompt for AI Agents