Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YYTransaction中 Runloop 为什么只在主线程中使用 ? #14

Open
MaydayFive opened this issue Aug 29, 2017 · 1 comment
Open

Comments

@MaydayFive
Copy link

_ASAsyncTransactionGroup.m中
CFRunLoopRef runLoop = CFRunLoopGetCurrent();
YYTransaction中CFRunLoopRef runloop = CFRunLoopGetMain();
只会在主线程中回调,可不可以改成CFRunLoopGetCurrent()?

@xll503721
Copy link

作者提供YYTransaction应该是主要想让你提交一些任务到主线程时,不影响layer的数据commit,所以优先级设置在CATransaction后,这样才能尽可能少影响到主线程,如果你数据提交去非子线程,那么就不这样YYTransaction了。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants