-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Restore timeout in JNI event loop #8821
Restore timeout in JNI event loop #8821
Conversation
#### Problem The event loop in JNI `IOThreadMain()` used to wait no more than ten seconds on each iteration. This timeout was temporarily removed in PR project-chip#6561. #### Change overview Add an explicit timer. Fixes project-chip#7756 _add a timer for sleepTime.tv_sec = 10; sleepTime.tv_usec = 0;_ #### Testing Passes Android workflow.
Why is this needed? |
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'd like some more context, anything that depends on this is 1) going to have a 10 second latency associated with which isn't desirable and 2) is obviously not managing its wakeups properly.
It may well not be. Before the socket-event PR, the |
Yes, I've seen it, and it raised my eyebrow. We don't want to wake up the stack every 10 seconds and drain the battery for no reason. No sane code should need this. |
Given that it hasn't been present for a month, no insane code needs it either. I'll just prune the obsolete TODOs in some future cleanup PR. |
Size increase report for "esp32-example-build" from 6b6c2ee
Full report output
|
Problem
The event loop in JNI
IOThreadMain()
used to wait no more than tenseconds on each iteration. This timeout was temporarily removed in
PR #6561.
Change overview
Add an explicit timer.
Also removes another obsolete TODO.
Fixes #7756 add a timer for sleepTime.tv_sec = 10; sleepTime.tv_usec = 0;
Fixes #7757 Integrate timer platform details with WatchableEventManager.
Testing
Passes Android workflow.