Synchronous / Asynchronous - plugging / nonblocking

First of all, do not force the concept and program benchmarking


Take an ordinary pot and kettle ring Example:

Normal is a pot in the program is called, has been in execution but that function does not return;

In this case, people also do other things, it is equivalent to the program where you can continue down; this case is also called non-blocking synchronization

Concept where you can have, but in the program, which is not true


Program, after calling a function, there are two situations: either wait for a return or continue down

Waiting to return to the concept of the synchronization / non-blocking correspondence

Program execution continues downward, can be divided into two cases, whether or not the called function is also performed cpu,

If the cpu is executed, then the corresponding asynchronous

If the cpu is not executed, and the corresponding non-blocking


So, in fact, the problem lies in sync with the concept of a non-blocking overlap in the program, that the two concepts in the middle of the program is the same thing

So to speak separate concepts and procedures; or to association, the two concepts of a program that corresponds to the case


The synchronous / asynchronous, blocking / non-blocking concept of what is it?

Synchronous / asynchronous: the caller if the return message, only with the callee

Blocked / non-blocking: the program in the state of waiting calls result, only with the caller

In this way, the problem will be able to justify the kettle

Guess you like

Origin www.cnblogs.com/justaman/p/11479008.html