問題文
A report walks a shared concurrent map with one of its bulk operations, takes the entry that carries the largest value, and calls the setter of that entry to correct it, and the call ends with an exception. On the class's own terms, what holds here and why?
選択肢
- An entry that a bulk operation hands over keeps the setter of a value, because the entry holds a reference back to the map and each write through it is folded in under the lock that the operations take
- An entry that a bulk operation hands over drops the setter of a value, because an entry of that kind is taken from a copy of the table and only a write that reaches the table itself is allowed to change a mapping
- An entry that a bulk operation hands over drops the setter of a value, because the class states that bulk operations on entry objects leave that one method out in every case
- An entry that a bulk operation hands over keeps the setter of a value, because the entry is the very object that the table holds and a change written through it reaches any reader at once