Exemplo n.º 1
0
        internal async Task VisitNodesAsync(ILibraryNodeVisitor visitor, CancellationToken ct = default(CancellationToken))
        {
            await _searching.WaitAsync();

            try {
                await Task.Run(() => _root.Visit(visitor, ct));

                ApplyUpdates(true);
            } finally {
                _searching.Release();
            }
        }
Exemplo n.º 2
0
 public void VisitNodes(ILibraryNodeVisitor visitor, CancellationToken ct = default(CancellationToken))
 {
     lock (this) {
         _root.Visit(visitor, ct);
     }
 }