What is the role of Async and Await ?

Поделиться
HTML-код
  • Опубликовано: 14 ноя 2024

Комментарии • 23

  • @funwithriyu9693
    @funwithriyu9693 Год назад +9

    I appreciate the value of your informative videos.

  • @jagdishchimnapure4711
    @jagdishchimnapure4711 Год назад +10

    how it is called asynchronous if it is waiting for the result. I did not understood

    • @imhassane
      @imhassane 11 месяцев назад +5

      When the execution reaches await, the task will be executed in another thread and while the main thread waiting for the response of that thread, it can treat other tasks. Imagine a web server, an Async task might be reading data from the database, while the data is being fetched, the main thread is not waiting for the database response, it can handle other incoming requests and when the database responds, the web server resumes its execution after the await keyword.

    • @vineetheee-a2422
      @vineetheee-a2422 10 месяцев назад +1

      "asynchronous" doesn't necessarily mean that code is running concurrently or in parallel. Instead, it refers to the ability to handle operations that might take some time to complete without blocking the execution of the rest of the code. to operate this operation some methods are defined and "ASYNC and AWAIT" is the one method....

    • @maulasab3388
      @maulasab3388 9 месяцев назад +1

      Me too

    • @maulasab3388
      @maulasab3388 9 месяцев назад

      ​@@imhassanehow many threads works here

  • @tcanbarasan
    @tcanbarasan Год назад +1

    Awesome videos bro. I was watching all your videos for the last couple of months. Thanks for all your videos 🙏

  • @avnishnegi7787
    @avnishnegi7787 Год назад +4

    i think this is the best explanation

  • @samuelk5847
    @samuelk5847 6 месяцев назад +1

    Nice!

  • @sachilkrishna
    @sachilkrishna Год назад +4

    Why not simply,
    Var i= method1();
    Int j = method2(i);
    Normally It advances only if line 1 is completed, right?

  • @hedgehogform
    @hedgehogform 7 месяцев назад

    Let's say you have a http server running on a new thread. How can I have methods that call a function that needs to run on the main thread from the HTTP server thread?

  • @shankarpubg9413
    @shankarpubg9413 Год назад

    Is this java or js? The structure of code is like java but the syntaxs are like js, anyway this is good explanation sir

  • @mohammedshahid8303
    @mohammedshahid8303 Год назад

    Can you please start these types of videos for SQL server as well?

  • @Ok_do2961
    @Ok_do2961 Год назад +2

    Keep doing more videos on the web api sir

    • @interviewhappy
      @interviewhappy  Год назад +2

      Sure 👍 will do @lakshmi2961

    • @Ok_do2961
      @Ok_do2961 Год назад +1

      @@interviewhappy I learned c# from your short videos. Sir really you are a good teacher sir, thank you sir

  • @AlizerLeHaxor
    @AlizerLeHaxor Год назад +1

    bot channel