Is it wise to access read-only data from multiple threads simultaneously?

后端 未结 4 551
小鲜肉
小鲜肉 2020-12-20 11:41

I have an application that I\'m trying to make multithreaded. Each thread will access a large chunk of read-only data.

Is is okay if multiple threads access the data

4条回答
  •  佛祖请我去吃肉
    2020-12-20 12:18

    If the data is read-only for the lifetime of all the threads that read it, then yes, it's perfectly fine to read without synchronization.

提交回复
热议问题