Skip to content
New issue

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

Don't await FallbackProjectManager updates #10196

Commits on Apr 1, 2024

  1. Don't await FallbackProjectManager updates

    Back in 17.10p1, the FallbackProjectManager would apply changes to the
    project snapshot manager without scheduling the updates on the
    dispatcher. This had the potential to create correctness and reliability
    problems if those changes collided with other updates that *were*
    scheduled on the dispatcher.
    
    To address the correctness problem, I made the FallbackProjectManager
    async and awaited any updates to the project snapshot manager. However,
    this created re-entrancy problems that resulted in deadlocks with
    Roslyn. I fixed a couple of those re-entrancy problems in 17.10p2, but
    hangs have persisted.
    
    A recent Watson dump revealed another yet another re-entrancy issue
    with background document promotion in the IRazorDynamicFileInfoProvider.
    The hang occurs when waiting for the FallbackProjectManager to add the
    file, which causes the project snapshot manager to notify listeners
    of the update, which causes one of the listener to try and perform the
    background document promotion again, which causes the hang.
    
    To address this, I've decided to just "fire-and-forget" the updates to
    the project snapshot manager. The updates will still happen on the
    dispatcher, but we won't wait for them and shouldn't hang.
    DustinCampbell committed Apr 1, 2024
    Configuration menu
    Copy the full SHA
    0abe94e View commit details
    Browse the repository at this point in the history