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

2018/08/16 异步,同步,阻塞,非阻塞 #27

Open
ChenPt opened this issue Aug 16, 2018 · 0 comments
Open

2018/08/16 异步,同步,阻塞,非阻塞 #27

ChenPt opened this issue Aug 16, 2018 · 0 comments

Comments

@ChenPt
Copy link
Owner

ChenPt commented Aug 16, 2018

异步和同步关注的是消息的通信机制

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

同步

同步指的是发出一个调用之后,在得到结果之前,该调用不会返回。一旦返回,就得到了结果

异步

异步指的是发出一个调用之后,该调用会直接返回,没有带结果。

阻塞

一个调用发起之后,直到调用结果被返回之前,该线程会被挂起,线程在得到调用结果之后才会被返回。

非阻塞

一个调用发起之后,在得到结果之前不会阻塞该线程。

@ChenPt ChenPt changed the title 异步,同步,阻塞,非阻塞 2018/08/16 异步,同步,阻塞,非阻塞 Aug 16, 2018
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