Skip to content

Conversation

mhightower83
Copy link
Contributor

It is not safe to call yield() from some callback contexts. In Stream.cpp timedRead() and timedPeek() always call yield() when a character is not available, even when _timeout == 0. This is unnecessary when the Stream class is used as a base class that is referencing a block of preset memory. The StreamString class is an example. With this change, these calls to yield() can be suppressed by a call to .setTimeout(0).

@d-a-v d-a-v merged commit ad2b51e into esp8266:master Jul 5, 2019
@mhightower83 mhightower83 deleted the pr2 branch August 19, 2019 16:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants