Igitigit2 / SimpleCanLib

CAN bus library for ESP32 and STM32 G431
24 stars 10 forks source link

Esp32-s3 version of ThreadSafeQueue.h #4

Open txf- opened 3 months ago

txf- commented 3 months ago

Hi,

Just a quick question why is the S3 version of this class checking for semaphores before accessing the queues. Aren't Freertos queues already thread safe? IIRC in Freertos, Semaphores themselves are Freertos Queues.

Igitigit2 commented 2 months ago

Well that's a good question. I had taken the code from somewhere else and it worked well, so I did not really question that part of it (I am not an expert on FreeRTOS). I did some research now and the result seems to confirm your point. With one of the next releases I will try without the semaphores. Thanks, for pointing this out!