Closed GoogleCodeExporter closed 9 years ago
Is it mainly because when we create the initial list, we use:
List<Item> initialValue=Collections.singletonList(newItem);
This is a immutable list, so we need to copy it to a mutable list?
What if I just use the LinkedList initially, then after that whenever I need to
add item, I just modify on the same object "current", will that cause
concurrency issues?
Original comment by yaowen...@gmail.com
on 25 Apr 2012 at 1:40
Please do not use the issues board to ask questions. Questions should be asked
on the google group for Spymemcached. They will also be answered much quicker.
>> This is a immutable list, so we need to copy it to a mutable list?
Yes we need to copy the list because it is immutable.
>> What if I just use the LinkedList initially, then after that whenever I need
to add item, I just modify on the same object "current", will that cause
concurrency issues?
If you just read from the list you don't need to copy it.
Original comment by mikewie...@gmail.com
on 13 May 2012 at 5:15
Original issue reported on code.google.com by
yaowen...@gmail.com
on 25 Apr 2012 at 1:30