private void Remove(ref Node node) { IWaitAndContinue item = node.Value; lock (_list) _list.Remove(node); node.Value = null; node = null; item.Dispose(); }
/// <summary> Adds a unit of work to the list </summary> public void AddWork(IWaitAndContinue item) { if (_disposed) throw new ObjectDisposedException(GetType().FullName); Check.NotNull(item); if (item.Completed) { item.Dispose(); return; } lock (_list) _list.AddLast(item); }
/// <summary> Adds a unit of work to the list </summary> public void AddWork(IWaitAndContinue item) { if (_disposed) { throw new ObjectDisposedException(GetType().FullName); } Check.NotNull(item); if (item.Completed) { item.Dispose(); return; } lock (_list) _list.AddLast(item); }