yingkong1987
yingkong1987

Reputation: 79

assetResourcesForAsset: cause deadlock

enter image description here

Two thread access fileName at the same time.

Set If 0 made deadlock. but If 1 was all going well.

So what brought this on?

Upvotes: 3

Views: 398

Answers (1)

lobianco
lobianco

Reputation: 6276

Make sure you're not calling +[PHAssetResource assetResourcesForAsset:] synchronously on the main thread. That method (and maybe other PHAssetResource methods, I haven't investigated yet) is executed on the main thread internally.

Upvotes: 2

Related Questions