Synchronous and asynchronous, blocking, and non-blocking

Source: Internet
Author: User

 

(1) synchronous and asynchronous, blocking, and non-blocking are two groups of concepts. There is no inevitable link between synchronization and blocking, and there is no inevitable link between asynchronous and non-blocking.

(2) synchronous and asynchronous: [Can you do other things while waiting?]: for example, when you go to a bank, scheduling is synchronous, and calling is asynchronous.

(3) blocking and non-blocking: The running status of the thread

(4) Whether it's the right or the call, if you cannot do other things while waiting, it is the blocking mode; otherwise, it is the non-blocking mode.

 

Synchronization: submit a request-> wait for the client to process the server (the client cannot do anything)-> process completed
Asynchronous: Submit the request-> wait for the client to process the server (the client can still do other things)-> process completed

 

Blocking refers to suspending the execution of a thread to wait for a condition to occur (the resource is ready)

Synchronous and asynchronous, blocking, and non-blocking

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.