How can I write a lock free structure?

后端 未结 21 1831
忘了有多久
忘了有多久 2020-12-13 12:57

In my multithreaded application and I see heavy lock contention in it, preventing good scalability across multiple cores. I have decided to use lock free programming to solv

21条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-13 13:52

    Inmutability would have this effect. Changes to the object result in a new object. Lisp works this way under the covers.

    Item 13 of Effective Java explains this technique.

提交回复
热议问题