This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
Ignore progress updates after suspending - #6186
Merged
Merged
Conversation
|
@1ec5, thanks for your PR! By analyzing this pull request, we identified @jfirebaugh to be potential reviewers. |
Contributor
|
I'll delegate review here to someone more familiar with |
Contributor
Author
boundsj
reviewed
Sep 21, 2016
| - (void)suspend { | ||
| MGLAssertOfflinePackIsValid(); | ||
|
|
||
| if (self.state == MGLOfflinePackStateActive) { |
Contributor
There was a problem hiding this comment.
Does resume need to set _isSuspending to NO? I'm not certain but it seems like a resumed offline pack may no longer report progress even if the state is set to MGLOfflinePackStateActive because of a region status change.
boundsj
approved these changes
Sep 21, 2016
boundsj
left a comment
Contributor
There was a problem hiding this comment.
Other than the question about the case of suspend, this looks good to me.
1ec5
force-pushed
the
1ec5-offline-suspend-progress-5538
branch
from
September 21, 2016 04:51
adf5733 to
3fb254b
Compare
-suspend and -resume are now presumed to be synchronous, even if technically they remain asynchronous under the hood.
1ec5
force-pushed
the
1ec5-offline-suspend-progress-5538
branch
from
September 21, 2016 05:35
3fb254b to
3b546b9
Compare
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This is a cosmetic fix that makes an offline pack appear to stop downloading as soon as
-suspendis called on it.Note that this change does not address the crash in #6092, which occurs because the
MBGLOfflineRegionObserver’s weak pointer to the MGLOfflinePack object has gone stale by the time late notifications come in from thembgl::OfflineRegion.MBGLOfflineRegionObserveris owned bymbgl::OfflineRegionand MGLOfflinePack doesn’t currently have a reference to it, although that might be one future direction for improvement.Fixes #5538.
/cc @jfirebaugh