I would actually go with the var myList = newList ...
# getting-started
u
I would actually go with the var myList = newList approach Well, maybe rwlocks are even faster then above approach. You _would_have to make myList volatile, as otherwise you don't have an ordering guarantee between creating the new list and assigning the reference to myList. You could end up with a window during which myList points to a not yet initialized list And accessing volatiles might be slower than taking a rwlock for reading