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

Add pending pipelines to Frame instantly #12928

Closed
wants to merge 7 commits into from

Check if pipeline is pending before attempting to activate it

  • Loading branch information
cbrewster committed Sep 3, 2016
commit 0a886914d8f166a822e2efea2f5f05318e49d76b
@@ -1842,7 +1842,7 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
if let Some(pipeline) = self.pipelines.get_mut(&pipeline_id) {
pipeline.is_pending = false;
}
// If the pending pipeline is in the current state, this means that a traversal has not
// If the pending pipeline is in the current entry, this means that a traversal has not
// occurred and we should focus the new pipeline if needed, fire location change events,
// and update the frame tree.
if is_current {
@@ -1992,6 +1992,13 @@ impl<Message, LTF, STF> Constellation<Message, LTF, STF>
}
}

// If this pipeline has already matured, do not try to activate it again.
if let Some(pipeline) = self.pipelines.get(&pipeline_id) {
if !pipeline.is_pending {
return;
}
}

let frame_id = match self.pipelines.get(&pipeline_id).and_then(|pipeline| pipeline.frame) {
Some(frame_id) => frame_id,
None => return warn!("activating closed pipeline {:?}", pipeline_id),
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.