-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
KingfisherManager retrieveImage
completionHandler
not called on specified queue
#1066
Comments
Yes, you are 100% right on this. The default value of |
I guess loading from memory cache would also cause this problem... |
I am also facing this issue after migrating to 5.0. As a workaround for now, I have switched to main thread in completion handler. Btw @onevcat thanks for the v5, It improved a lot of things and resolved couple of pressing issues. |
I am using version 5.3.1. I face the same problem. Any progress on this? My code looks like this:
Thanks. |
@rocxteady Hi, this method is a bit different for internal performance reason. You need to specify the callback queue explicitly, otherwise, it uses ImageCache.default.retrieveImage(
forKey: key, options: options, callbackQueue: .mainAsync, completionHandler: { /* */ }
) |
@onevcat thank you for the information. But it's a bit misleasing. I thought we could set a callback queue. Maybe you should change it we can't set it this way. Therefore there will not be any misleading. Thank you again. |
Check List
Thanks for considering to open an issue. Before you submit your issue, please confirm these boxes are checked.
Issue Description
What
After upgrading from 4.x to 5.x this snippet of code:
doesn't respect
.callbackQueue
option and callback is executed on some background thread. Callback is called (background thread) from:Currently I don't have time for further debug, but I suspect on method:
since there is a default parameter for
callbackQueue
which is.untouch
and options are not parsed at all.Reproduce
Currently I've managed to reproduce this issue only when image is loaded form disk cache. For downloading image and in memory cache it seems that it works fine.
The text was updated successfully, but these errors were encountered: