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

RunLoop的作用 #11

Open
sugite opened this issue Feb 15, 2017 · 0 comments
Open

RunLoop的作用 #11

sugite opened this issue Feb 15, 2017 · 0 comments

Comments

@sugite
Copy link

sugite commented Feb 15, 2017

大神你好,我看AsyncDisplayKit的代码的时候,它是直接在display时将displayBlock加入到后台线程执行,然后在RunLoop触发Observer回调时提交block的执行结果,然后调用completeBlock,但是我看YYAsyncLayer好像是在RunLoop触发Observer回调时才在display里面将displayBlock添加到后台线程执行,然后执行完后直接向主线程提交结果,好像跟ASDK不太一样,所以这里感觉有点糊涂,到底为什么要在RunLoop上添加Observer呢,为什么不直接将绘制任务添加到后台线程然后将结果返回给主线程呢?

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

1 participant