I would like to use the web server library ESPAsyncWebServer to create an API on my ESP32. But I was wondering, since the web server most likely runs on the secondary processor, do I need to make accessing data thread safe? So that the main loop and the web server can both access the data?
Or are they actually running on the same thread an I don't need to worry about it?
CodePudding user response:
Yes, you need to implement thread safe access to any shared data. Asynchronous processing means it runs in its own thread. See the documentation for clarification.