arduino-libraries / Ethernet

Ethernet Library for Arduino
http://arduino.cc/
261 stars 264 forks source link

Avoid conflicts with similar declaration of MAX_SOCK_NUM #144

Closed Max19thl closed 5 months ago

Max19thl commented 4 years ago

Great! it was surprise for me now, that yield() also defined as weak function. Thanks! However, definition of some ethernet library specific handler might allow to avoid re-enterability issues when ethernet functions will be invoked indirectly from yield() handler in case if some "ethernetYield" will be redefined in sketch , it will be possible to raise some global flags before normal yield() to prevent nested lib invocation. So, my suggestion to use ethernetYield() weak handler execution in loops inside lib, and to define default weak handler with normal yield(); execution inside It looks slightly more flexible.

CLAassistant commented 3 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.