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

Entangle overlapping transitions per queue #20670

Merged
merged 1 commit into from
Jan 27, 2021

Commits on Jan 27, 2021

  1. Entangle overlapping transitions per queue

    When multiple transitions update the same queue, only the most recent
    one should be allowed to finish. We shouldn't show intermediate states.
    
    See facebook#17418 for background on why this is important.
    
    The way this currently works is that we always assign the same lane to
    all transitions. It's impossible for one transition to finish without
    also finishing all the others.
    
    The downside of the current approach is that it's too aggressive. Not
    all transitions are related to each other, so one should not block
    the other.
    
    The new approach is to only entangle transitions if they update one or
    more of the same state hooks (or class components), because this
    indicates that they are related. If they are unrelated, then they can
    finish in any order, as long as they have different lanes.
    
    However, this commit does not change anything about how the lanes are
    assigned. All it does is add the mechanism to entangle per queue. So it
    doesn't actually change any behavior, yet. But it's a requirement for my
    next step, which is to assign different lanes to consecutive transitions
    until we run out and cycle back to the beginning.
    acdlite committed Jan 27, 2021
    Configuration menu
    Copy the full SHA
    a30d15f View commit details
    Browse the repository at this point in the history