Use atomic collections to make sure all of the memory contents are visible from writing to reading thread.