| 169 | //============================================================================= |
| 170 | |
| 171 | void TaskCoroutineESP32::task_entry(void* param) FL_NOEXCEPT { |
| 172 | auto* self = static_cast<TaskCoroutineESP32*>(param); |
| 173 | if (self->mFunction) { |
| 174 | self->mFunction(); |
| 175 | } |
| 176 | self->mCompleted.store(true); |
| 177 | // Block forever — task will be deleted by the destructor or stop() |
| 178 | while (true) { |
| 179 | vTaskDelay(portMAX_DELAY); |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | //============================================================================= |
| 184 | // TaskCoroutineESP32 Implementation |