This repository has been archived by the owner on Jun 21, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 122
Add async completion handler to MGLOfflineStorage::preloadData #188
Merged
Conversation
This file contains 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
@julianrex @1ec5 do you think completion handler needs to be exposed publicly or we can have it as an internal method? |
1ec5
reviewed
Mar 2, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested changelog entry (iOS and macOS):
- Added the
-[MGLOfflineStorage preloadData:forURL:modificationDate:expirationDate:eTag:mustRevalidate:completionHandler:]
method for determining when the data is ready to retrieve from the cache. (#188)
In general, the public API should accept a completion handler or delegate or send a notification for any asynchronous operation if possible. |
alexshalamov
force-pushed
the
alexshalamov_async_preloadData
branch
2 times, most recently
from
March 4, 2020 16:36
603e78a
to
e12b7c1
Compare
julianrex
approved these changes
Mar 9, 2020
1ec5
approved these changes
Mar 10, 2020
Also a question about deprecation: #188 (comment). |
alexshalamov
force-pushed
the
alexshalamov_async_preloadData
branch
from
March 11, 2020 18:17
e12b7c1
to
44fdcfe
Compare
@1ec5 @julianrex moved completion handler definition. Please feel free to merge if needed. |
alexshalamov
added a commit
that referenced
this pull request
Mar 26, 2020
Fixes pause/resume bug introduced in #188
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.
As the database operations were moved to separate thread to avoid blocking resource loading, it might be required to know when preloadData has been completed.