Reputation: 1
I have a large object that will be accessed by multiple threads continuously. But this object has to be updated periodically and while updating no thread shouldn't be blocked.
I think we can have a Timer to update the object that updates in a duplicate object and once the update is done we can update the object reference with the duplicate object.
Does any one has a better ideas to implement this effectively?
Upvotes: 0
Views: 213
Reputation: 2111
you can implement read/write locks for each property of the object unless you have dependencies between properties.
Upvotes: 1