AlteriomPainlessMesh
v2.1.1
Easy ESP32/ESP8266 mesh networking with Alteriom IoT extensions
Loading...
Searching...
No Matches
src
painlessTaskOptions.h
Go to the documentation of this file.
1
// The following compile options are required for painlessMesh
2
#define _TASK_PRIORITY
// Support for layered scheduling priority
3
#define _TASK_STD_FUNCTION
// Support for std::function (ESP8266 and ESP32)
4
// Required for painlessMesh lambda callbacks
5
#define _TASK_SELF_DESTRUCT
// Scheduler-managed deletion of heap-allocated
6
// one-shot tasks. The Scheduler deletes the Task
7
// in execute(), after disable() has returned, so
8
// a task never has to delete itself from inside
9
// its own onDisable callback (which is a
10
// use-after-free: Task::disable() writes to the
11
// task object after onDisable returns). Used by
12
// scheduleAsyncClientDeletion() in
13
// connection.hpp. See issue #373.
14
15
// NOTE: _TASK_THREAD_SAFE is currently DISABLED due to incompatibility
16
// with _TASK_STD_FUNCTION in TaskScheduler v4.0.x
17
//
18
// The thread-safe mode would prevent FreeRTOS assertion failures on ESP32,
19
// but TaskScheduler's implementation has bugs when trying to cast function
20
// pointers to std::function objects in processRequests().
21
//
22
// Workaround: Use semaphore timeout increase (mesh.hpp line 544: 10ms -> 100ms)
23
// See: docs/troubleshooting/SENSOR_NODE_CONNECTION_CRASH.md
24
//
25
// #ifdef ESP32
26
// #define _TASK_THREAD_SAFE // DISABLED - Incompatible with _TASK_STD_FUNCTION
27
// #endif
28
Generated by
1.9.8