예제 #1
0
        public Task BeforePackagesInstalledAsync(CancellationToken ct)
        {
            var timeoutCts = CancellationTokenSource.CreateLinkedTokenSource(ct);

            timeoutCts.CancelAfter(5000);
            return(_host.StopSessionAsync(timeoutCts.Token));
        }
예제 #2
0
        public Task BeforePackagesInstalledAsync(CancellationToken cancellationToken)
        {
            // Package is about to be installed. Stop intellisense session
            // so loaded packages are released and new one will not be locked.
            // If update is pending, cancel it.
            CancelPendingIndexUpdate();
            var timeoutCts = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken);

            timeoutCts.CancelAfter(Debugger.IsAttached? 50000 : 5000);
            return(_host.StopSessionAsync(timeoutCts.Token));
        }