You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
MGLOfflinePack suspend has no effect in mapbox-ios-sdk-3.2.0-beta.2 #4418
@jfirebaugh[someOfflinePack suspend] was working in 3.2.0-beta.1 but not in 3.2.0-beta.2. I've verified this by setting a break point in the delegate method - (void)offlinePack:(MGLOfflinePack *)pack progressDidChange:(MGLOfflinePackProgress)progress which continues to be called and the pack instance state remains MGLOfflinePackStateActive.
What you are observing may be an expected consequence of the asynchronous nature of offline downloads. The download is conducted on a background thread, and the cross-thread messaging can result in a delay between the call to [someOfflinePack suspend], the suspend message getting delivered to the background thread, and the acknowledgement and final status notification getting sent back to the main thread. The pack's state tracks the acknowledged state of the download, i.e. the state last reported from the background download thread.
@jfirebaugh The suspend has no effect in the sense that the download never, even eventually, stops. The offline pack continues until the download is completed.
Has this pack previously been downloaded to completion? If you resume a complete pack, the download will start from 0 but pausing won’t stop until the pack has accounted for all the resources that have already been downloaded – that is, all the pack’s resources.
Activity
jfirebaugh commentedon Mar 21, 2016
Can you please provide a more detailed description for the issue? What did you do, what did you expect to happen, what happened instead?
postmechanical commentedon Mar 21, 2016
@jfirebaugh
[someOfflinePack suspend]was working in3.2.0-beta.1but not in3.2.0-beta.2. I've verified this by setting a break point in the delegate method- (void)offlinePack:(MGLOfflinePack *)pack progressDidChange:(MGLOfflinePackProgress)progresswhich continues to be called and thepackinstancestateremainsMGLOfflinePackStateActive.jfirebaugh commentedon Mar 22, 2016
What you are observing may be an expected consequence of the asynchronous nature of offline downloads. The download is conducted on a background thread, and the cross-thread messaging can result in a delay between the call to
[someOfflinePack suspend], the suspend message getting delivered to the background thread, and the acknowledgement and final status notification getting sent back to the main thread. The pack'sstatetracks the acknowledged state of the download, i.e. the state last reported from the background download thread.There's more discussion of this in #4229.
postmechanical commentedon Mar 22, 2016
@jfirebaugh The
suspendhas no effect in the sense that the download never, even eventually, stops. The offline pack continues until the download is completed.1ec5 commentedon Mar 27, 2016
Has this pack previously been downloaded to completion? If you resume a complete pack, the download will start from 0 but pausing won’t stop until the pack has accounted for all the resources that have already been downloaded – that is, all the pack’s resources.
postmechanical commentedon Mar 28, 2016
@1ec5 I don't recall unfortunately. I've paused working with the Mapbox SDK for now. I will try again once a stable 3.3.0 release is available.
friedbunny commentedon Mar 10, 2017
Closing as stale, but please feel free to post more information as it becomes available.