Software Architecture Interview Questions : kzbin.info/www/bejne/d6W3mJaYgbSkg68 25+ OOPS Interview Questions : kzbin.info/www/bejne/q2qcqHSld893rLM 30 Important C# Interview Questions : kzbin.info/www/bejne/eHzcn3h4hdacf68 20+ SQL Server Interview Questions : kzbin.info/www/bejne/iXbHcnluorh-iZY 10+ Power BI Interview Questions : kzbin.info/www/bejne/eaDdlGyNg6eFqpY 20 MSBI Interview Questions : kzbin.info/www/bejne/hKjCpHt7gNOCi6c SQL Server Joins : kzbin.info/www/bejne/gYXZint7o9mppJo SQL Step by Step - kzbin.info/www/bejne/q3jPl4NvpJyeo7s Angular Step by Step Tutorial for Beginners : kzbin.info/www/bejne/Y2q5lIptgqd3qZo 25 Angular Interview Questions : kzbin.info/www/bejne/Y5vIoKx6f6mmia8 25 Important ASP.NET Interview Questions : kzbin.info/www/bejne/ponQfpejf7p2Zsk 35 Important JavaScript Interview Questions : kzbin.info/www/bejne/kJOXlYOfbKh0hLc 20 MySQL Interview Questions : kzbin.info/www/bejne/b5nJm3Zjd9WMaJI 5 MSBI Interview Questions : kzbin.info/www/bejne/a3abYmiXjaaqj7M 20 PHP Interview Questions : kzbin.info/www/bejne/Z5PTf4avo7qlopo
@polavarapuumasri52523 жыл бұрын
🔥
@ambikhpxxcvzcbnamali64412 жыл бұрын
P
@MaheshSingh-ev8yh Жыл бұрын
Hi Shiv Sir. I am following your video when I have started my career 10 years back but still your videos r so fresh and so amaze, really pin point the basics.👏
@MicroftHunter5 жыл бұрын
They have similarity of background worker but the difference with the two is async await is not using a separate thread,but they are markers which mark code positions from where control should resume after a task or thread completes.
@lynndemarest19023 жыл бұрын
This is true as far as it goes, but I think threads are necessarily created to do the async work. These threads are created not in the application, but in the dotnet framework or the operating system, which is why they're not visible in Visual Studio. When a request is made to read a website, for example, the async state machine is created by the dotnet framework and a call is made to the network adapter's driver. The driver's work is done on a separate thread which when it returns picks up a thread from the OS thread pool to continue work on the next part of the state machine. Right?
@dustinzhang2934 жыл бұрын
I think the point is that async/await pattern itself doesn't necessarily imply multithread. It means the code behind it is non-blocking. Whether there is a new thread really depends on the actual code (cpu bound or not)
@questpondvideos3 жыл бұрын
So right...
@shervilgupta922 жыл бұрын
Just Switched from Java to C# and was scratching my head learning the async concept. This really cleared the confusion. Thank you so much !
@frankabignale21762 жыл бұрын
why would you? java has more jobs and high paying ones too.
@shervilgupta922 жыл бұрын
@@frankabignale2176 well wasn't my decision to make, my current company uses c#
@frankabignale21762 жыл бұрын
@@shervilgupta92 what do you work on?
@BigBhardwaj6 жыл бұрын
A big shout out to you, Shiv ! and sincerely hope e-(ager) learners remain 'synchronized' for more 'context' and content on Multi-threading etc. !
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@UserSam8322 жыл бұрын
You should given Doctorate in C# Shiv. Ur knowledge and passion to help others is invaluable
@swarupfule35573 жыл бұрын
Why there is just 835 likes. Definitely this is best style of teaching.
@ssssss17384 жыл бұрын
great explanation! As a node js developer here, this video somehow teaches me the nature of "async", even though node js using libuv and event loop, but the underlying idea is kind same. Thank you!
@shaikhussain_ece Жыл бұрын
I'm In Loop mode of your videos which are simple and clear
@vladimirkuznetsov36017 ай бұрын
Much better than some of Microsoft dev's talks on async/await!
@wpelfeta Жыл бұрын
Thanks for this video. I remember being taught that Async/Await was used for mitigating I/O blocking, but a lot of my peers talk about it as if it were multithreading. So it's good to verify what I had learned. I think one point of confusion is probably that Async/Await is in the System.Threading namespace, which makes it seem like it's related to threading.
@expertreviews11126 жыл бұрын
Brilliant video. Can't appreciate enough
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@1989vinayak3 жыл бұрын
Beautifully explained, Thanks a lot, i have a query, if async doesn't create new thread, then who executes the 5- 6 code block as main thread process would be completed by that time
@shayamsandhya5 жыл бұрын
Good video but this seems to be true only when you run a task which does't require a CPU bound operation such as delay if you are running a loop inside a task then it create a thread for it
@being_aslam_tiger2 жыл бұрын
Greatest Explained 👑💕
@minezgio31752 жыл бұрын
Really good video. Finally I was to able to understand this concept.
@mehdiichkarrane88084 жыл бұрын
this is some very valuable content. thank you for the clear explanation
@taqikhan5418Ай бұрын
We heard that TASK is a wrapper on thread which internally uses thread, and Tasks are often used with async await making this question in mind.
@shubhamchoudhary5957 Жыл бұрын
Sir After wathcing your video my threading conceopt and the async concept is clear.
@amoltiwari8371 Жыл бұрын
Thank you shiv sir to explain in depth
@ruler54083 жыл бұрын
It's an awesome video and crystal clear on asynchronous working. Thank You
@31337flamer3 жыл бұрын
very informative .. made some things clear and showed some things that i was not aware of. thanks for sharing!
@amreshchandra40985 жыл бұрын
I never write comment on youtube.But for you i m writting.Very nice explaind.
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@dibbyo4564 жыл бұрын
Everything is crystal clear now. Awesome video.
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@artak94392 ай бұрын
To avoid blocking the main thread, it must either perform context switching or create a new thread, there is no other option I think.
@chevn92604 жыл бұрын
Thank you, I have learned to use async
@mohsinmemon33622 жыл бұрын
great explanation . thanks for making this video.
@mirali829 Жыл бұрын
Thanks I 've got a deeper concept of it
@SzTz1002 жыл бұрын
Awesome explanation
@vrajeshbadgujar8 ай бұрын
Great Explanation!
@simonsullivan83442 жыл бұрын
Brilliant made it clear
@Sopiro4 жыл бұрын
What a good explanation! I got to know a lot. thank you!
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@xybersurfer2 жыл бұрын
async can increase the performance of your application when doing I/O Bound tasks. for example by doing web requests, while waiting for other web requests. but i agree that async can't increase the performance of CPU Bound tasks, as far as i understand it. but it would be nice if async used all available cores, because i really like how little it changes the structure of code. thanks for looking into those thread IDs
@sohaibalvi44103 жыл бұрын
Worker Thread is a Synchronization "Thread that connected the callback and main thread" right sir?
@rukmininaik9875 жыл бұрын
Thank you soo much sir for such a wonderful explanation. This video was indeed so much helpful. Got to know many new things.
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@konnelius5 жыл бұрын
Thanks a lot for a very informative explanation :)
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@barteknikliborc71092 жыл бұрын
greate explenation, thanks!
@nandanthareja4 жыл бұрын
Commendable explanation
@TheSmoothPower5 жыл бұрын
Excellent video, thank you Sir
@deepeng372 жыл бұрын
Can you please explain .ConfigureAwait(false) of Async method ? Is it creating a background thread for asynch method?
@wonseoklee802 жыл бұрын
So async is kind of abstract term whereas thread is a concrete concept. Async can implement thread but also it can use state machine, event loop, timer interrupt or whatever it can make the situation async.
@questpondvideos2 жыл бұрын
No Async is not abstract term. Threads and Async are different
@wonseoklee802 жыл бұрын
@@questpondvideos Thread used to used for asynchrony too. When we use render thread that renders html, AI image generation, photoshop project, and DAW projects, it not only makes better perfomance but also achiving concurrency as well. We can do this without async keyword.
@sony6426 жыл бұрын
Really worth to watch... appreciated!!
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@battuhant Жыл бұрын
if we write a code that does a lot of work for example a for loop instead of task.delay. will the code still not produce threads more than one?
@unknownunknown-qx3gu5 жыл бұрын
Not accurate since async calls does use threads but those threads aren't created as normal threads. Async uses the .NET thread pool to execute asynchronously, that is the reason why new threads aren't visibly created.
@questpondvideos3 жыл бұрын
Even back ground threads are seen in Debug threads nothing comes as such. Yes as its software there would be some thread but the CALLER DOES NOT CREATE THREAD. And what if it was hardware ACK then no threads. Threads will be there or not depends its CPU bound or not.
@impostersyndromedev5 жыл бұрын
Excellent video! Love your code samples.
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@psycho.2u3 жыл бұрын
19:56 May be Console.Read() was blocking the thread...?? So when u press enter remaining got executed. Not sure. Just a guessing
@ktvideos12195 жыл бұрын
Superb explanation!
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@jeetucobra3 жыл бұрын
Sir can you help me when i using async then my Request.context is getting null
@victory4vivek16 жыл бұрын
SPK sir So what should be case in .NET Core? As it is a console application. Whenever we are using async-await, will it create new threads? As we just saw in case of Console application?
@questpondvideos6 жыл бұрын
In all console application context is a problem. Winforms , WPF have multiple UI so has context funda. Console application is just one UI so no context is created as such.
@johnnguyen16554 жыл бұрын
brilliant tutorial!!!!!!!!!!!!!!!
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@stalera5 жыл бұрын
why don't you add the statemachine detail video url in the description. Or did I miss it?
@ritikamanchanda97234 жыл бұрын
Very nicely explained, I have a question though What happens when we use ConfigureAwait(false) with async/await. Does it executes on another thread?
@AmitChoudhary104 жыл бұрын
By default, when you use async/await, it will resume on the original thread that started the request. However, if another long-running process currently has taken over that thread, you will be stuck waiting for it to complete. To avoid this, you can use a method called ConfigureAwait with a false parameter. When you do, this tells the Task that it can resume itself on any thread that is available instead of waiting for the thread that originally created it.
@ritikamanchanda97234 жыл бұрын
Thanks @@AmitChoudhary10 for clearing my doubt.
@lynndemarest19023 жыл бұрын
If you don't care which thread picks up the state machine then ConfigureAwait(false) is appropriate. Some have said it should be the default, since it is more often needed than not.
@thesuperiorman83425 жыл бұрын
I sub'd. Such a good explanation.
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@MukeshSharma-ru3ho4 жыл бұрын
well explained , thank you
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@mihailomarcetic25162 жыл бұрын
Gread video !!!!!
@pankajsingh-eg9hm6 жыл бұрын
Excellent sir
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@gaoping77435 жыл бұрын
really good explain.
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@Wynell2 жыл бұрын
I don't really understand it. In the beginning you said that async doesn't use threads, but later in the video you showed that it actually does. What am I getting wrong?
@questpondvideos2 жыл бұрын
yes the main thread does not:-) . The async process can create threads or can be hardware process....
@user-nk9ez6ly5s2 жыл бұрын
Actually I was also in confusion. But what sir was trying to say is the Main thread doesn't create threads, the Task is handled by TPL, which uses threads from thread pool , on this thread pool thread all this state machine stuff runs. Am I right Shiv Sir?
@questpondvideos2 жыл бұрын
@@user-nk9ez6ly5s yes the CALLER does not create thread thats the catch.
@faeez47224 жыл бұрын
Amazing
@abid777ful5 жыл бұрын
I am just ,why it's not created a separate thread in the application you demonstrated in the beginning? But its created new thread in the same console application you demonstrated at the end. Confused
@questpondvideos5 жыл бұрын
Its because of context , we have talked about the same in the video. Do relook once again.
@abid777ful5 жыл бұрын
Thank you very much Sir for replying. Yes I got it, context is lost in the end application. And for resuming where it left it creates that one. Your videos are very simple to understand, helpful ,informative and detailed. Its saves our lot of time from searching the same online to explore the same. You are doing great job for all of us. Huge Respect and Thanks to you Sir.
@vinodreddy17224 жыл бұрын
Where that async task runs,I case of threading task runs in thread t8?
@ziaasad26 жыл бұрын
plz ans me ?? Suppose that you have to load 2 files in parallel in a WPF C# application, now you have two techniques to load files either use threads or use Async Task. You need to choose one method to load files, Give at least two solid reasons for choosing one method over the other.
@GauravChaudhary095 жыл бұрын
if performance is not needed, you can use async which is more suitable for I/O and API calls
@questpondvideos4 жыл бұрын
Do visit www.questpond.com and do email questpond@questpond.com to get queries clear.
@calaiarasan73185 жыл бұрын
here 7 and 8 also should be in thread id 4.correct ?
@ziv45455 жыл бұрын
no, it returns to main thread and executes code 7 and code 8. 20 seconds later it runs on another thread code 5 and code 6.
@InCircle4 жыл бұрын
Hi Questond, the display of the video has incorrect spelling for async,
@questpondvideos4 жыл бұрын
Well noted sir. Thanks and will correct the same.
@questpondvideos4 жыл бұрын
Corrected Sir. Thanks
@mdora39835 жыл бұрын
As far as i understand, when thread context changes then it is change the thread of first starting. am i right?
@lazycyclone2 жыл бұрын
at 19.50 you say you dont know what happened you pressed enter and it appeared. that shows you do not understand ansync/await in c#. still trying to teach.
@questpondvideos2 жыл бұрын
Great way of proving your point by insulting a teacher who has been teaching C# for decade. So So coming to your point i have explained that new thread comes for switching the context please watch the further part of video.
@mrityunjayahiremath39516 жыл бұрын
Please make a full course video on Power BI
@questpondvideos4 жыл бұрын
Thanks and noted the same. Do visit www.questpond.com
@lamnguyen21064 жыл бұрын
thanks
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@HimalayaGarg4 жыл бұрын
async free the main thread to continue next statements
@questpondvideos4 жыл бұрын
With out creating new threads
@vamsikumar_n5 жыл бұрын
super sir
@questpondvideos4 жыл бұрын
Thanks. Do visit www.questpond.com
@jigarshah14385 жыл бұрын
Hi you said that async method work on main thread only and it doesn't create new (you emphasize on this word) thread behind the scene. I was going through other video and I found your explanation and their explanation have different view. Here is the link of that video kzbin.info/www/bejne/gZfWaWeabM-Uipo Pls let me know if I have miss understood other video's explanation. Thanks.
@Kooshad13 жыл бұрын
link to part 1: kzbin.info/www/bejne/bnvIYopuZ9uqj68
@IvarDaigon5 жыл бұрын
this is a terrible explanation of threads and async. awaiting async does use the threadpool which creates threads as needed. There is no guarantee that your code will run on a separate thread when you wait an async method but it can if the main thread is busy. What you are doing in your demo is running SomeMethod synchronously on the main thread by NOT awaiting it. If you run FXCop code analyzer on our code you will get a warning explaining this. If you await SomeMethod and run it in your for loop 1000 times and put a synchronous operation like Task.Delay(1000).Wait() inside the method you will see 999 threads created and an exception because a C# application cannot spawn more than 1000 threads (total) by default.
@questpondvideos4 жыл бұрын
I get your point of synchronous call , i did one more example of moving to pure Async calls i still see do not see new threads.
@abissqlabissql60034 жыл бұрын
@@questpondvideos Agreed i also do not see new threads when you run in full asyc as well. Regarding async using pool is right but not fully right . The pool thread is only for sync context which you explained in later part of video. Good going.
@questpondvideos4 жыл бұрын
@@abissqlabissql6003 yes so right the extra thread what is created in asyn is for context sync not for actual execution.
@jayan.mathew2 жыл бұрын
Insufficient example I think. When you run 2 async methods from main method without await what will happen?
@questpondvideos2 жыл бұрын
Async needs await so this is technically not possible, If you are saying only from call side it will be a normal call.
@jayan.mathew2 жыл бұрын
May be you are talking about a very minimal (not a practical one) async scenario where Task is not involved.
@questpondvideos2 жыл бұрын
@@jayan.mathew let me know what scenario you are discussing of Asyc with out Await
@jagdishdinkar23252 жыл бұрын
You can not run async with out await.???? You are confused
@prashantlawhatre70072 жыл бұрын
Excellent video. One suggestion though, please be careful when using gender pronouns (I know that it was unintentional but still). Using neutral terms is a good practice. Thanks & regards
@alejandrobonilla32012 жыл бұрын
So you are saying async does not create more threads but we can clearly see a new thread created for the async method on your screen? Conclusion: either your explanation is wrong or my eyes are lying.
@questpondvideos2 жыл бұрын
Then you did not hear me clearly. :-) The caller did not create the thread , the asynch process did. Sometimes the asynch process can be a CPU clock waiting so in those instances there are no threads. For synchng the context there is thread created which is not for the actual task.
@realKeiichiArt5 жыл бұрын
It is not threads, it is processes
@unknownunknown-qx3gu5 жыл бұрын
That is not true pal, I'm sorry.
@GumbieUsaGames2 жыл бұрын
Content is good but those analogy in examples are :(
@pramodkumarw10 ай бұрын
you confuse us sir,we need to learn more on this topic