Thread safety of a Dictionary

前端 未结 2 1747
借酒劲吻你
借酒劲吻你 2020-12-01 14:06

If I initialize a generic dictionary once, and no further adds/updates/removes are allowed, is it safe to have multiple threads reading from it with no locking (assuming tha

2条回答
  •  再見小時候
    2020-12-01 14:44

    Yes, it's safe if you don't modify the dictionary any more. Thread safety is only an issue in read/write scenarios

提交回复
热议问题