With the new ConcurrentBag in .NET 4, how do you remove a certain, specific object from it when only TryTake() and TryPeek() are
ConcurrentBag
TryTake()
TryPeek()
public static void Remove(this ConcurrentBag bag, T item) { while (bag.Count > 0) { T result; bag.TryTake(out result); if (result.Equals(item)) { break; } bag.Add(result); } }