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

多线程、阻塞、非阻塞 #152

Open
TieMuZhen opened this issue Apr 4, 2022 · 0 comments
Open

多线程、阻塞、非阻塞 #152

TieMuZhen opened this issue Apr 4, 2022 · 0 comments
Labels

Comments

@TieMuZhen
Copy link
Owner

TieMuZhen commented Apr 4, 2022

一、Redis多线程

Redis多线程其实是IO多线程,将IO拿出来在其他CPU上处理,处理完后都要排队在一个CPU上串行进行计算
image

二、阻塞、非阻塞

阻塞和非阻塞关注的是程序在等待调用结果(消息,返回值)时的状态.

阻塞调用是指调用结果返回之前,当前线程会被挂起。调用线程只有在得到结果之后才会返回。
非阻塞调用指在不能立刻得到结果之前,该调用不会阻塞当前线程。

参考文献

@TieMuZhen TieMuZhen added the Redis label Apr 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant