arkhipenko / TaskScheduler

Cooperative multitasking for Arduino, ESPx, STM32, nRF and other microcontrollers
http://playground.arduino.cc/Code/TaskScheduler
BSD 3-Clause "New" or "Revised" License
1.33k stars 243 forks source link

ESP32 dual core usage #157

Closed n1ckdm closed 2 years ago

n1ckdm commented 2 years ago

Is there anything in particular I should do to ensure that both cores of the ESP32 are utilised when using TaskScheduler, or is the handled by the library internally?

Or does the library only support single core?

arkhipenko commented 2 years ago

TS is a cooperative multi-tasking library and therefore runs in a single thread, single core.

arkhipenko commented 2 years ago

ESP32 runs on FreeRTOS adopted to multi-core architecture. Details here: https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/freertos-smp.html?highlight=freertos

I have been quite successful in combining the benefits of both frameworks. Example is here: https://github.com/arkhipenko/dnd