Skip to content
This repository was archived by the owner on Jan 20, 2025. It is now read-only.
This repository was archived by the owner on Jan 20, 2025. It is now read-only.

Callback context on ESP32? #657

@ashley-schaeffer

Description

@ashley-schaeffer

I'm running ESPAsyncWebServer on ESP32, with AsyncTCP obviously.
I don't create any FreeRTOS tasks myself so I only have the Arduino loop() checking for some flags. Those flags are set from inside callbacks I passed to the ESPAsyncWebServer and AsyncTCP libraries.

However I only recently took a closer look at the source of the AsyncTCP library and realized a new task is created for calling the user supplied callbacks. Am I right in thinking that I should synchronize access between any variables accessed by both the loop() function and the callbacks (both in ESPAsyncWebServer and AsyncTCP) to prevent possible race conditions?

I'm asking because I haven't really seen this mentioned explicitly somewhere. I'm guessing it's only an "issue" on the ESP32?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions