Hi all,
Is there a need to put a mutex around the reading of a global variable
that is initialized before any threads are created and remains
unchanged for the duration of the program, even though there is no
writes to it?
I thought that as long as I don't alter the value of the global
variable, it should be fine. I'm asking because the program I'm
writing involves having threads read and use values from a global
structure for the entire computation function they execute. If I put a
mutex around that, then it's as good as not having multiple threads at
all.
Thank you.
Regards,
Rayne