Differences between C ++ synchronous/asynchronous and blocking/non-blocking

Source: Internet
Author: User

C ++

------- What is synchronization, what is asynchronous, and what is blocking? Non-blocking?

Visit various forums,

Comprehensive views,

My opinion is posted here,

If people in the community are confused,

Younger brother will remember for life,

May the experts give us some advice,

The back of the Yangtze river carries the front waves,

Embrace the bright future.

-------- Question

Here is an example of my understanding:

Suppose I am the boss, you are an employee, and I have something on hand. I will go home to get something after this.

Synchronization: I told you to do things. At the same time, I waited for the results until you finished.
Blocking: At the same time, during the waiting period, if I go to sleep (the thread is suspended), nothing can be done, that is, blocking.
Non-blocking: On the contrary, if I continue to do something else, it is not blocked.

Asynchronous: I told you to do things. I went home directly. After you finished, I was notified.
Blocking: No key at home. Please wait for your wife to return.
Non-blocking: Get something directly with a key.

These are my personal opinions.

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.