multithreading - what does synchronized mean in C++ -


i reading const , thread safety in c++11, here relevant stack overflow question, , here video herb sutter. word "synchronized" mentioned. "synchronized" mean?

for example, follwing 2 lines herb's video

"copying same object in multiple threads without synchronization" (at 13:40)

"... const object thread-safe(truly immutable or internally synchronized)" (at 15:03)

synchronization means sharing of resources between threads , processes without leading race around conditions , dead locks.

without synchronization in 1st statement means not lock resource , unlock when done.

in second statement means const object cannot modified , hence immutable , doesn't need synchronization.

a study on thread synchronization techniques using mutex , semaphore better understand why needed , how done.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -