ConcurrentBag扩展 批量加入

public static void AddRange<T>(this ConcurrentBag<T> @this, IEnumerable<T> toAdd)
    {
        foreach (var element in toAdd)
        {
            @this.Add(element);
        }
    }
原文地址:https://www.cnblogs.com/zeroone/p/8043321.html