Closed vslavik closed 10 years ago
Thanks for picking this up @vslavik. How was this getting executed on the main queue?
As said in the description: when you use e.g. accessFileURL:withBlock:persistPermission:
from the main queue. Which may e.g. when you're doing some real quick that is not worth offloading to a worker thread or when, like me, you have old code that is not threaded well.
@vslavik I've fixed this in branch release/1.0.13
, could you let me know if this resolves the issues you had?
It does, thanks.
Thanks for finding the issue and a solution. :blush:
dispatch_sync() is documented to deadlock if the target queue is the same as the current one. This happens when AppSandboxFileAccess is used from the main thread. Fix the deadlock by explicitly checking for the current queue and calling the block directly.