ClaretCache
ClaretCache copied to clipboard
[update] change 'usleep()' to 'add Runloop Source '
CheckList
Thanks for considering to this repository. Before you submit your issue, please confirm these boxes are checked.
- [x] I have read 《[EN]Style guide for Swift repo [CN]Swift项目代码规范、规约选型》.
- [x] 我遵守一下 Merge 规则:邀请群组中任意一人进行review,即可合并。让 reviewer 在 PR 所在页面写下review意见表示通过,即可合并。最简单写一句 LGTM 也可以。不按照本规则执行,自己 PR 自己 Merge 并引入问题,会被收回 Merge 权限。
My issue:
What I have done:
i think should use an prefer other techniques like RunLoop scheduling.
https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/nsrunloop_Class/Reference/Reference.html
using usleep() will arise a lot of problems related to multithreading using usleep() is not a good alternative, because it may block the GUI