Search found 2 matches
- Sun May 26, 2024 2:14 am
- Forum: ESP-IDF
- Topic: Understanding when to create tasks
- Replies: 2
- Views: 625
Re: Understanding when to create tasks
Tasks are fairly expensive to create/destroy, so the standard way is to start the task on startup and hand them work to do via multithreading primitives like the task notifications or event groups you mentioned. Event handlers are just glorified callbacks; I imagine you'd use those as well (but e.g...
- Sat May 25, 2024 10:42 pm
- Forum: ESP-IDF
- Topic: Understanding when to create tasks
- Replies: 2
- Views: 625
Understanding when to create tasks
I have an event handler attached to the IP_EVENT_STA_GOT_IP event. When it occurs, some data is exchanged over TCP and then I want the esp to run a task which periodically records and stores data from a sensor, until some other event occurs and it stops. Should this event handler create a task which...