Adafruit-GFX-Library
Adafruit-GFX-Library copied to clipboard
Add yield hook as a weak definition.
We could leave the yield() behavior customizable to handle edge cases like #285. Most ESP8266 users need to call yield() inside expensive drawing operations to keep the watchdog from firing. However, some sophisticated users who are using a different scheduling regime like Ticker must not call yield(), so we provide an opt-out.
I like the weak symbol for this, over other hook techniques, because the linker can remove the replaced symbol, there's no init-order race, and it doesn't bring any of this drama into the header. :)
Fixes #285
A few more people have chimed in on #285 since this was created, and I think this small fix might serve everybody pretty well. Promoting from draft to real PR in the interest of solving yield() issues forever.
Would be nice to have this little patch merged.
Hi @BillyDonahue , has this been merged? Kind regards and thank you for taking care.