Skip to content

Conversation

@DvdGiessen
Copy link
Contributor

Reduces the CPU usage by the PPP thread by sleeping for one tick if there was nothing to read; preventing the loop using 100% CPU when the read operation has a zero timeout and immediately returns.

@dpgeorge
Copy link
Member

Thanks, this looks like a reasonable thing to do.

Reduces the CPU usage by the PPP thread by sleeping for one tick if
there was nothing to read; preventing the loop using 100% CPU when the
read operation has a zero timeout and immediately returns.

Signed-off-by: Daniël van de Giessen <[email protected]>
@dpgeorge dpgeorge force-pushed the esp32_ppp_sleepwhenempty branch from f0a274e to a1d20e0 Compare October 31, 2023 01:11
@dpgeorge dpgeorge merged commit a1d20e0 into micropython:master Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants