-
Notifications
You must be signed in to change notification settings - Fork 3
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
Various fixups #38
Various fixups #38
Conversation
lib/src/diag_device.rs
Outdated
@@ -123,7 +124,7 @@ impl DiagDevice { | |||
}) | |||
} | |||
|
|||
pub fn write_request(&mut self, req: &Request) -> DiagResult<()> { | |||
fn write_request(&mut self, req: &Request) -> DiagResult<()> { |
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.
Why did we decide this function is no longer public?
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.
It's not used anywhere but internally to the module, and (for now) there's no requests an outside user would send besides the ones we're already using internally
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.
I'm aware this is WIP and still has bugs
This way, even if the program exits unexpectedly, there's a reasonable value for the "end time" of a log.
7ef1031
to
d156401
Compare
Finally tracked down the weird async race condition stuff, so imo this is now ready for review! We should do some field testing with these changes, but I'm fine if that happens either as a build from this branch, or a build from main after we merge it. |
Mixing async and sync I/O leads to a multitude of complications, and generally speaking it's much more convenient to stick to one paradigm or the other. Since axum (and many other HTTP servers) use async, and since async is a convenient model for performing operations like "handle an MPSC message or file read, whichever happens first", let's commit to an async interface.
d156401
to
0b6c06c
Compare
Just a couple fixups i've been thinking about:
Not ready for merging yet, but wouldn't mind a first-pass review