inflearn logo
inflearn logo

[Understanding with pictures] The most intuitive understanding of the concepts of sync and async

This is a 19-minute lecture that will help you understand the concepts of synchronous and asynchronous programming very easily.

(4.9) 181 reviews

2,590 learners

Level Basic

Course period Unlimited

sync
sync
async
async
sync
sync
async
async
Thumbnail
allen님의 프로필 이미지

About the concept of additional Blocking/Non-Blocking

Hello! This is Alan.

I made a short lecture, but I don't know if it was helpful! However, many people left good reviews saying it was helpful, so I feel like it was a good idea to make the class. ^^

It's nothing else, other than the occasional synchronous and asynchronous concept,

What is the concept of Blocking/Non-Blocking ? These kinds of questions have been coming up.. If there is anyone who might be interested, I am leaving the content here in case it will be helpful.

I think it is a priority to first learn the synchronous/asynchronous concepts that I talked about in class. Since some languages do not use the Blocking/Non-Blocking concepts, I think you should first check if these concepts exist in the language you are studying. ^^

Yes, if you are using a language that uses the Blocking/Non-Blocking concept, I recommend that you refer to the content below.


▶︎ Blocking / Non-Blocking
is an important concept in whether the called function returns immediately or not.

1) Blocking - does not return immediately (blocks work from being done)

2) Non-Blocking - returns immediately



▶︎ Synchronous/asynchronous : Whether the calling function or the called function (callback) cares about whether the task is completed

1) Motivation - the calling function cares about completing its work

2) Asynchronous - the called function (callback function) cares about the completion of the task.


(However, it is said that this concept of combining Blocking & Async is not used intentionally because it does not allow other tasks to be done anyway .)



And in languages where the concept of Blocking/Non-Blocking is not generally used, as I said in class,


It is convenient to think of synchronous as a concept combined with Blocking , and asynchronous as a concept combined with Non-Blocking .

And if there is any other material that someone else has written very well, I will also attach a link. ^^

https://homoefficio.github.io/2017/02/19/Blocking-NonBlocking-Synchronous-Asynchronous/

https://siyoon210.tistory.com/147


Thank you. :)

Comment 1
    marihwang님의 프로필 이미지

    Hello. https://siyoon210.tistory.com/147 There are some points in the description of this blog that contradict the description in the main text. Can you please take a look and verify it? In particular, in the blog's scenario 2 (Sync + Non Blocking), it says that the team leader cannot do other work until employee 1's work is finished, but in the main text written by Alan, it seems that other work can be done as indicated. In my opinion, in scenario 2, after assigning work to employee 1, employee 2, and employee 3 at the same time, the team leader can periodically check whether the work of employee 1, employee 2, and employee 3 is finished while doing another work.

Free