ArduinoCore-megaavr icon indicating copy to clipboard operation
ArduinoCore-megaavr copied to clipboard

Compatibility: delay() should call yield()

Open dok-net opened this issue 6 years ago • 2 comments
trafficstars

In official AVR Arduino core, delay() is based on yield(), which is turn has weak binding and is overridable. I am asking that delay() on any Arduino platform must call yield() at least once, preferably at the end of delay(), for compatibility with libraries like Scheduler and similar implementations.

dok-net avatar Sep 25 '19 09:09 dok-net

Good suggestion, but yield must be called inside the busy loop not at the end of delay (there is no point in blocking until the end of the delay).

cmaglie avatar Sep 25 '19 15:09 cmaglie

PR #58 gets serious on this issue :-)

dok-net avatar Sep 27 '19 09:09 dok-net