-
Notifications
You must be signed in to change notification settings - Fork 11
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
implement data task #208
implement data task #208
Conversation
fe08f0d
to
e1a42b6
Compare
micro-rdk/src/esp32/entry.rs
Outdated
@@ -60,7 +61,7 @@ pub async fn serve_web_inner( | |||
// instantiate the Async<TCPStream> for the connection to app.viam.com | |||
// otherwise there is a chance a race happens and will listen to events before full | |||
// initialization is done | |||
let _ = Timer::after(std::time::Duration::from_millis(60)).await; | |||
let _ = Box::pin(Timer::after(std::time::Duration::from_millis(60))).await; |
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.
- Can we add another block comment here explaining why this is
Box::pin
. - I noticed that the native entry point does not have this wait. Should it? If not, why does it not need it but esp32 does? Is the comment still correct?
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 forgot to take this out. I don't think it's necessary but I'll test to make sure
- I actually don't know, but the native server appears to work without it
robot.clone(), | ||
); | ||
} | ||
let data_manager_svc = match DataManager::<StaticMemoryDataStore>::from_robot_and_config( |
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.
All relevant from esp32/entry.rs
are re-iterated for this file.
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.
LGTM
1898cc8
to
7e810ee
Compare
7e810ee
to
fe805fa
Compare
This required an increase in main task stack size from 22528 -> 35840, which is not a reasonable increase, but I figured while I tried to diagnose the source of excess stack usage I would open a draft PR and see if anyone on the team has a better intuition for where the problem(s) might be.
EDIT: Pinning the future returned by
ViamServer::serve
appears to have fixed it. Planning to do more testing before taking the PR out of draft.