We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
As per bug https://bugzilla.mozilla.org/show_bug.cgi?id=1723191 we have scenarios where a sync load is triggered in the middle of an async load and we should consider options for handling such scenario better than with https://github.com/mozilla/l10nregistry-rs/blob/master/src/source/mod.rs#L239-L255
With that approach, we just load the one-off synchronously and return it, while we also complete async and we only will cache the async.
Maybe we could hook into the async load, discard it, supply data from the sync load and cache that?
The text was updated successfully, but these errors were encountered:
I started looking into this, and the trick here seems to be - how do we cancel an ongoing future in https://github.com/mozilla/l10nregistry-rs/blob/master/src/source/fetcher.rs#L28
We'd like to be able to "drop" a future, and replace it with ResourceStatus resolved in https://github.com/mozilla/l10nregistry-rs/blob/master/src/source/mod.rs#L254 and then "inject" our synchronously loaded data into https://github.com/mozilla/l10nregistry-rs/blob/master/src/source/mod.rs#L24 and resolve it.
ResourceStatus
Two questions:
Drop
@emilio - do you have any pointers for me here?
Sorry, something went wrong.
No branches or pull requests
As per bug https://bugzilla.mozilla.org/show_bug.cgi?id=1723191 we have scenarios where a sync load is triggered in the middle of an async load and we should consider options for handling such scenario better than with https://github.com/mozilla/l10nregistry-rs/blob/master/src/source/mod.rs#L239-L255
With that approach, we just load the one-off synchronously and return it, while we also complete async and we only will cache the async.
Maybe we could hook into the async load, discard it, supply data from the sync load and cache that?
The text was updated successfully, but these errors were encountered: