iterator threadsafety improvement