Change the default callback queue policy to SafeAsyncMainThread, don't need main queue check at all by dreampiggy · Pull Request #3797 · SDWebImage/SDWebImage

This is the best practice for UI related code

New Pull Request Checklist

  • I have read and understood the CONTRIBUTING guide

  • I have read the Documentation

  • I have searched for a similar pull request in the project and found none

  • I have updated this branch with the latest master to avoid conflicts (via merge from master or rebase)

  • I have added the required tests to prove the fix/feature I am adding

  • I have updated the documentation (if necessary)

  • I have run the tests and they pass

  • I have run the lint and it passes (pod lib lint)

This merge request fixes / refers to the following issues: ...

Pull Request Description

After discussion in #3766

Actually this SafeAsyncMainQueue does not do anything useful. UIKit always check MainThread , but not MainQueue. So, we should remove this policy and always use SafeAsyncMainThread instead

This is also what Kingfisher or ReactNative do in their latest release, to support UICollectionViewDiffableDataSource