如图所示,有时,嵌入式数组注释的元素会被修改,或者新的注释将作为第一个元素插入到注释中,当这些修改发生时,我想在最小范围内锁定一些东西以避免讨厌的问题,问题是:
1,What scope to lock is appropriate?
2,How to lock?
{
name: 'Me',
comments: [{
"author": "Joe S.",
"text": "I'm Thirsty"
},
{
"author": "Adder K.",
"text": "old content"
}]
}