A simple client for MQTT. More...
#include "PubSubClient.h"Go to the source code of this file.
Macros | |
| #define | PUBSUB_WAIT_YIELD() |
| Give other tasks a chance to run while waiting for data. | |
A simple client for MQTT.
This file is part of the PubSubClient library.
Definition in file PubSubClient.cpp.
| #define PUBSUB_WAIT_YIELD | ( | ) |
Give other tasks a chance to run while waiting for data.
On FreeRTOS a yield only reschedules a task of equal or higher priority, which is what a real time scheduler has to promise. A task spinning in a wait loop therefore never lets the idle task run, and a watchdog fed from that idle task fires. Blocking for a single tick is what actually hands the CPU over.
vTaskDelay(1) rather than delay(1): the intent is one tick, and delay(ms) maps to vTaskDelay(ms / portTICK_PERIOD_MS), which rounds down to zero below a 1 kHz tick.
Definition at line 27 of file PubSubClient.cpp.