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.