Adafruit-GFX-Library icon indicating copy to clipboard operation
Adafruit-GFX-Library copied to clipboard

Add yield hook as a weak definition.

Open BillyDonahue opened this issue 5 years ago • 3 comments

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

BillyDonahue avatar May 22 '20 08:05 BillyDonahue

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.

BillyDonahue avatar Jun 08 '20 06:06 BillyDonahue

Would be nice to have this little patch merged.

vortigont avatar Oct 15 '20 19:10 vortigont

Hi @BillyDonahue , has this been merged? Kind regards and thank you for taking care.

kkuez avatar May 01 '21 09:05 kkuez