|
@@ -147,14 +147,15 @@ namespace System.Collections.Generic
|
|
|
InsertItem (index, item);
|
|
InsertItem (index, item);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- [MonoTODO ("should we lock and remove item without invoking RemoveItem() instead?")]
|
|
|
|
|
public bool Remove (T item)
|
|
public bool Remove (T item)
|
|
|
{
|
|
{
|
|
|
- int index = IndexOf (item);
|
|
|
|
|
- if (index < 0)
|
|
|
|
|
- return false;
|
|
|
|
|
- RemoveAt (index);
|
|
|
|
|
- return true;
|
|
|
|
|
|
|
+ lock (root) {
|
|
|
|
|
+ int index = list.IndexOf (item);
|
|
|
|
|
+ if (index < 0)
|
|
|
|
|
+ return false;
|
|
|
|
|
+ list.RemoveAt (index);
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
public void RemoveAt (int index)
|
|
public void RemoveAt (int index)
|