Many readers, one writer - is it possible to avoid locking?

前端 未结 5 1053
深忆病人
深忆病人 2021-02-01 06:28

Say you have an in-memory list of strings, and a multi-threaded system, with many readers but just one writer thread.

In general, is it possible to implement this kind o

5条回答
  •  萌比男神i
    2021-02-01 07:03

    You can also use Microsoft's new Immutable Collections library: http://blogs.msdn.com/b/bclteam/archive/2012/12/18/preview-of-immutable-collections-released-on-nuget.aspx

    Note: this is completely separate from the Concurrent Collections.

提交回复
热议问题