Fix a re-entrancy issue in the DiffView code#952
Open
AHSauge wants to merge 1 commit intoMurmele:masterfrom
Open
Fix a re-entrancy issue in the DiffView code#952AHSauge wants to merge 1 commit intoMurmele:masterfrom
AHSauge wants to merge 1 commit intoMurmele:masterfrom
Conversation
fetchMore gets called multiple times. This queues the calls in the event loop rather than being directly executed This also add a guard to get an early out. Lastly, we drop processing events within fetchMore since there's no indication that this call is actually needed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related to #944
It seems like dropping the
QApplication::processEvents();is the way to go here. That and queuing the callbacks seems to fix the problem. I'm not entirely sure ifmFetchingis even needed, but it's there just in case. I'm not sure what kind of side-effects this potentially could have.@Murmele From the code, it looks like you added this at some point. Is there a concrete need to actually process events within fetchMore or is it acceptable post-pone the processing? To me it seems to work fine without the call at least, but maybe there's a corner case I'm not aware of here.
Fixes #946