We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I believe it's the safer alternative to use Task.Wait:
Task.Wait
public CacheState ManageCache(ref ProviderCache cache, NormalizedSnapshotSpanCollection spans, ITextBuffer buffer) { if (cache != null && cache.Snapshot == spans[0].Snapshot) { return CacheState.Resolved; } ProviderCache cache1 = null; var result = ThreadHelper.JoinableTaskFactory.Run<CacheState>(async () => { await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync(); try { cache1 = await ProviderCache.ResolveAsync(buffer, spans[0].Snapshot); return cache1 == null ? CacheState.NotResolved : CacheState.Resolved; } catch (Exception ex) { Log.LogError(ex.ToString()); return CacheState.NotResolved; } }); cache = cache1; return result; }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I believe it's the safer alternative to use
Task.Wait
:The text was updated successfully, but these errors were encountered: