gbmhunter / MRingBuff

A C++ FIFO buffer framework designed for embedded applications.
MIT License
11 stars 1 forks source link

Make sure RingBuff::Read and RingBuff::Write are thread-safe functions #27

Open gbmhunter opened 10 years ago

heihuhu310 commented 9 years ago

Is thread-safe? I dont' see any code for thread-safe

gbmhunter commented 9 years ago

Not yet, that's why there is this issue. Not sure how to do it, given I want this to be as platform independent as possible (i.e. to run on embedded platforms), and threads are either not available or provided by some third-party library (rather than relying on pthread or std::thread).

heihuhu310 commented 9 years ago

i think most platform is multi-thead in the day, this lib may not suport thread-safe now, but if not, it will be not useful. i search many ring buff lib but still don't found~~~ maybe i need to do it by myself.

heihuhu310 commented 9 years ago

recommend ccan lib to you :http://ccodearchive.net/ , it implement many useful function, good luck