I need to access (read only) data std::listfrom one or more threads running in my application.
This list will be created only once upon loading the application, and after the entire list has been read
from multiple threads ... let's say I will do it
for (std::list <iterator>iii=list->begin();ii!=list->end();ii++)
which reads a list of multiple threads.
Now my question is, will it create a problem with violation of access rights if I did not synchronize access to the list?
I ran the application without any synchronization simulators. I did not encounter a problem. but since I doubt it, I would like to confirm it.
According to my understanding, even in a mutithreading application, only one thread is executed at runtime. because I do not update the list from muliple streams, and all streams read the list, which may not be required to provide exclusive access to the list .. is this correct?
please put me right if i'm wrong
source
share