eteran / c-vector

A dynamic array implementation in C similar to the one found in standard C++
MIT License
737 stars 109 forks source link

Is c-vector thread-safe? #4

Closed salocinx closed 4 years ago

salocinx commented 4 years ago

Hi. I am trying to use c-vector in FreeRTOS. It does work fine when using within a single task, but I run into problems when trying to use it across two tasks. Is this use case tested or undefined? Thanks.

eteran commented 4 years ago

Hi. So c-vector has the same basic thread safety as something an a plain C-array. That is, multiple readers should work just fine, but multiple writers must be synchronized by the caller.

salocinx commented 4 years ago

Thanks!