Skip to content

esp32/network_ppp: Reduce PPP thread CPU usage. - #12728

Merged
dpgeorge merged 1 commit into
micropython:masterfrom
DvdGiessen:esp32_ppp_sleepwhenempty
Oct 31, 2023
Merged

dpgeorge merged 1 commit into
micropython:masterfrom
DvdGiessen:esp32_ppp_sleepwhenempty

Conversation

@DvdGiessen

Copy link
Copy Markdown
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
Copy Markdown
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