访问 [PFUser currentUser] 导致死锁 [英] Access to [PFUser currentUser] causing deadlock
问题描述
在使用parse iOS sdk v1.2.20 时,多个线程尝试访问[PFUser currentUser] 时偶尔会出现死锁
Getting a deadlock occasionally when several threads trying to access [PFUser currentUser] when using parse iOS sdk v1.2.20
看起来每当我进行 PFQuery 调用或 PFCloud 函数调用时,这些操作也会访问 [PFUser currentUser],因此如果您从单独的线程进行查询,则会增加死锁的机会.
It looks like whenever I make a PFQuery call or PFCloud function call, these operations also access [PFUser currentUser], so there's increase chance of deadlock if you are making queries from separate threads.
其他人为此找到了解决方案,我怀疑 parse 甚至知道这个问题,因为他们很久以前就关闭了这些相关问题:https://www.parse.com/questions/parse-locking-启动主线程可能出现死锁还有这个:https://www.parse.com/questions/occasional-freezing-at-pfuser-currentuser
Anyone else find a solution for this, I doubt parse even is aware of the problem as they closed these related issues long ago: https://www.parse.com/questions/parse-locking-up-the-main-thread-possible-deadlock And this one: https://www.parse.com/questions/occasional-freezing-at-pfuser-currentuser
推荐答案
Parse 已发布更新,可能修复 currentUser
死锁.
Parse has released an update with a possible fix of the currentUser
deadlock.
希望这能解决您的情况.
Hopefully this fixes your situation.
检查更改日志并尝试更新到 Parse SDK v1.7.2.
Check the changelog and try updating to Parse SDK v1.7.2.
这篇关于访问 [PFUser currentUser] 导致死锁的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!