Skip to content
New issue

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

Fix completion queue bug in ImageDownloader #163

Merged
merged 1 commit into from
Jul 8, 2021

Conversation

eneko
Copy link
Contributor

@eneko eneko commented Jul 8, 2021

This pull request includes (pick all that apply):

  • Bugfixes
  • New features
  • Breaking changes
  • Documentation updates
  • Unit tests
  • Other

Summary

In most cases, ImageDownloader will be executed from the main thread. However, in scenarios where this might not be the case, we'd want to make sure the completion queue is executed in the .current queue (when no custom queue is specified).

Implementation

Store .current queue outside of any closures to ensure the queue is the same the method was called in.

Test Plan

An integration test has been added for this scenario.

Copy link
Contributor

@plflanagan plflanagan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@eneko eneko merged commit f070673 into main Jul 8, 2021
@eneko eneko deleted the fix/image-downloader-queue branch July 8, 2021 18:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants