0
Thread safe | read write need
Hi Refer code below: It is currently not suited for thread safety. If I just protect set value function body with mutex, will it be fully thread safe? It must be because other function is not an issue. Right ? Or do we need to protect read also in all the case and that arises the need of reader writer mutex ? Any case where only read function is not protected and write is the only one which must be projected ? https://sololearn.com/compiler-playground/cUixiJC91t2V/?ref=app
1 ответ