{{ message }}
Fix optimistic_yield to not yield on each call after x µs#6804
Merged
earlephilhower merged 9 commits intoFeb 20, 2020
Conversation
d-a-v
approved these changes
Nov 18, 2019
d-a-v
left a comment
Collaborator
There was a problem hiding this comment.
I wonder if we should use instead the very light esp_get_cycle_count() here
Contributor
Author
c0bc8d3 to
fa55a4f
Compare
d8a07c1 to
6c50e74
Compare
2448189 to
2a15fbc
Compare
earlephilhower
requested changes
Dec 9, 2019
earlephilhower
left a comment
Collaborator
There was a problem hiding this comment.
Seems like a very good fix of a long-standing problem. My only concern is the change in Schedule.cpp which seems to be orthogonal to the optimistic_yield change and replaces an esp_schedule/cont_yield with a yield...
e997d25 to
e91221e
Compare
e91221e to
00b7dfe
Compare
d326448 to
6f672a9
Compare
6a24767 to
62cd62b
Compare
4b6b570 to
7e5dd70
Compare
… x us, but yield only every x us between optimistic_yield calls.
…rval_us can overflow - 26s at 160MHz CPU clock.
… with a literal parameter value.
…uino>, have to resort to preprocessor definition for inlining.
7e5dd70 to
50fab51
Compare
earlephilhower
requested changes
Feb 20, 2020
earlephilhower
approved these changes
Feb 20, 2020
devyte
approved these changes
Feb 20, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Before, once an invocation of
loop()runs for x µs, each call tooptimistic_yield()does reallyyield().Now, only yield every x µs between
optimistic_yield()oryield()calls.