Linux---The difference between blocking and non-blocking, synchronous and asynchronous

block

In order to complete a function, a call is initiated, and if the conditions for completion are not currently met, it will wait forever.

Non-blocking

In order to complete a certain function, initiate a call. If the conditions for completing the function are not currently available, an error will be reported immediately and returned.

The difference between blocking and non-blocking

When a call is initiated, whether it will return immediately when the completion conditions are not met.When mainly discussing a function

Synchronize

The function is completed by the process itself, and the processing to complete the task is a sequential process.

asynchronous

The function is completed by the system, the process only needs to initiate a call, and the processing of tasks is not necessarily sequential.

  • Asynchronous blocking: The
    function is completed by someone else, and if someone else has not completed it, it will wait forever.
  • Asynchronous non-blocking
    functions are completed by others, and there is no need to wait for completion.

The difference between synchronous and asynchronous

Whether the function is completed by yourself. Whether the process of task processing is a sequential one.

Guess you like

Origin blog.csdn.net/qq_42708024/article/details/108807946