Which do I use, ConfigureAwait True or False?

  Рет қаралды 35,440

Brian Lagunas

Brian Lagunas

3 жыл бұрын

In this video we answer the ever popular question "Which do I use, ConfigureAwait True or False?".
The direct answer to this question is:
- If you are a writing code for the UI, use ConfigureAwait(true).
- If you are writing code in a library that will be shared, use ConfigureAwait(false)
If you want to know why, then keep watching until the end, because I teach you the difference between ConfigureAwait(true) and ConfigureAwait(false).
We start by understanding exactly how the await keyword in C# works. You learn about the continuation task and how to properly use ConfigureAwait to control which thread the continuation task runs on and why that's important.
We talk about why the UI code relies on ConfigureAwait(true) and what happens if you set ConfigureAwait(false). Hint: you'll get a threading exception.
We'll also cover why you need to use ConfigureAwait(false) in all of your library code to help protect the consumers of your code from encountering deadlocks and other threading issues.
Be sure to watch my new Pluralsight course "Introduction to Prism for WPF":
pluralsight.pxf.io/bE3rB
Sponsor Me:
github.com/sponsors/brianlagunas
Follow Me:
Twitter: / brianlagunas
Twitch: / brianlagunas
Blog: brianlagunas.com
GitHub: github.com/brianlagunas

Пікірлер: 147
@BrianLagunas
@BrianLagunas 3 жыл бұрын
One point I forgot to make in the video was around performance. Using ConfigureAwait(false) is performs MUCH better because it's expensive to switch back to the original thread. This becomes especially important when doing async stuff in loops or performing expensive work after returning. Don't force the system to switch back unless you have to. Stick with ConfigureAwait(false) by default. Only set ConfigureAwait(true) if you really must run the continuation task on the original thread.
@IvarDaigon
@IvarDaigon 2 жыл бұрын
It's not particularly expensive to switch contexts, the problem is that the original/UI thread might be busy doing something else (like actually drawing the UI) or it could be blocked by some long running synchronous operation and so your code has to wait for that block of code to finish before it can continue and then any UI update code has to wait for your function to finish before it can update (unless you pepper it with await Task.Yield()). So in that sense it can loosely be considered more expensive because you are taxing the UI thread when your code could have easily ran on another thread if it were written to be more async friendly (e.g. using Databinding instead of updating the UI directly)
@BrianLagunas
@BrianLagunas 2 жыл бұрын
Thanks for sharing your insights
@SherifAli-xx7xt
@SherifAli-xx7xt 4 ай бұрын
This is the default in .net core right? but in .net framework it's the opposite. Did I understand it right ?
@NicolaiPrang
@NicolaiPrang 3 ай бұрын
​@@SherifAli-xx7xt ConfigureAwait(true) is the default. You can't set a new default, though. So, you MUST just always set it to false everywhere you don't want it to return to the calling thread. Even though I personally use ConfigFalse a lot more than ConfigTrue. kzbin.info/www/bejne/sJmmg4tpd5ykrbs
@JustNrik
@JustNrik 27 күн бұрын
@@SherifAli-xx7xt What? From where you undertood that? ConfiureAwait(true) is the default in all frameworks and it has never been different.
@martinbratt4593
@martinbratt4593 3 жыл бұрын
Incredible! I was struggling with this in a project today and then this video pops up and answers the question! Thanks Brian!
@BrianLagunas
@BrianLagunas 3 жыл бұрын
I'm so glad this video was helpful to you. Thanks for watching
@blakepell7139
@blakepell7139 2 жыл бұрын
This the most clear explanation of ConfigureAwait I've seen. Thank you for sharing!
@BrianLagunas
@BrianLagunas 2 жыл бұрын
Thank you very much
@CHITRANSHSHARMA
@CHITRANSHSHARMA 2 жыл бұрын
I agree too
@vaibhavachanty3659
@vaibhavachanty3659 9 ай бұрын
What an explanation man! I was seriously in a confusion for the difference between the two and almost got headache . But it's very clear now because of your video love you 😍
@niranjannt637
@niranjannt637 Жыл бұрын
These short videos are awesome Brain. Learning a lot.
@strandloper
@strandloper 3 жыл бұрын
Thanks for this. I've wondered about this before. Everyone just seems fo say always use ConfigureAwait(false). Now I know what it means and can intelligently decide when to use it.
@BrianLagunas
@BrianLagunas 3 жыл бұрын
I'm glad I could help
@jessegador
@jessegador 3 жыл бұрын
Brief but accurate and precise explanation. Thanks.
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thanks for watching
@BashaBill5
@BashaBill5 3 жыл бұрын
As always.. great vid. I'm trying to brush up on my Prism skills.. so I will see you again very soon. 👍
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Sounds good to me! See you around :)
@vipinkrishna131
@vipinkrishna131 3 жыл бұрын
Explanation at its best!! Thanks a lot !
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thanks for watching
@julianturner6203
@julianturner6203 3 жыл бұрын
Thanks Brian, I love these new videos. Your the best
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thank you very much for the kind words.
@bhoopalsingh4463
@bhoopalsingh4463 3 жыл бұрын
Super simple explanation. Thanks a lot. Now I understand it !!! :)
@BrianLagunas
@BrianLagunas 3 жыл бұрын
I'm glad it was helpful
@angelochiello
@angelochiello 3 жыл бұрын
Half of my code is ConfigureAwait(false)... Finally I know why. I do API or library mainly.
@BrianLagunas
@BrianLagunas 3 жыл бұрын
You're doing it right 👍
@zerologics5105
@zerologics5105 3 жыл бұрын
Thanks Brian, I was struggling with the use of ConfigureAwait till now but not anymore. :)
@BrianLagunas
@BrianLagunas 3 жыл бұрын
That's great to hear. Thanks for watching.
@Faygris
@Faygris 6 ай бұрын
Thank you for the great explanation! I had a hard time understanding this before
@BrianLagunas
@BrianLagunas 6 ай бұрын
Glad I could help
@mihaimyh
@mihaimyh 2 жыл бұрын
Thanks, really simple video, I finally understood the ConfigureAwait concept.
@BrianLagunas
@BrianLagunas 2 жыл бұрын
Great! Thanks for watching
@88spaces
@88spaces 6 ай бұрын
Nice and clear explanation. Thank you.
@BrianLagunas
@BrianLagunas 6 ай бұрын
Thanks for watching
@FernandoMoreira
@FernandoMoreira 3 жыл бұрын
Great explanation! Thank you. Now I get it. You got a new subscriber ;)
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thanks for watching and the sub 😁
@user-mr-m12312
@user-mr-m12312 3 жыл бұрын
Great video, thank you Brian!
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thank you for watching
@amrelsher4746
@amrelsher4746 Жыл бұрын
It is the first time I understand ConfigureAwait Thank you.
@BrianLagunas
@BrianLagunas Жыл бұрын
I’m glad my video was helpful. Thanks for watching
@AvnishKumar7
@AvnishKumar7 3 жыл бұрын
Again an awesome video. Thanks brian.
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thank you sir
@VinuP2023
@VinuP2023 3 жыл бұрын
Sir, here is a request video from me and I believe many of us need it. Can you please do a video on XAML/WPF debugging using any tools or any techniques you had developed over years such as finding failures in binding. I know one way to look in output window. Thank you
@BrianLagunas
@BrianLagunas 3 жыл бұрын
I'll have to think about this one and how to best present the information. Thanks for the idea.
@_ganesh_khatri_
@_ganesh_khatri_ 3 жыл бұрын
Thank you so much for these videos which are clearing all of our doubts about async and await. Your method of explanation is so much easy to understand, it just feels like child's play. I have one question please, I would like to know what is the right way to write async method which does not have any async method called inside it and has a value to return back. I may not sound clear but hope you understood my question. Thank you.
@BrianLagunas
@BrianLagunas 3 жыл бұрын
If you look at my video on reporting progress from a task (kzbin.info/www/bejne/sIKwf3l7r5p8jLc), you'll see I have a method called LoopThroughNumber. You'll want to follow how I have that sample setup, but rather than calling a void method, you'll call your method that has a return value.
@PauloMorgado
@PauloMorgado 3 жыл бұрын
ConfigureAwait has is not directly about threads. It's about SynchronizationContext. WPF and its DispatcherSynchronizationContext or Windows Forms and its WindowsFormsSynchronizationContext happen to be tied to the UI thread, but that's not the case of, for example, the AspNetSynchronizationContext. referencesource.microsoft.com/#mscorlib/system/threading/synchronizationcontext.cs,8b34a86241c7b423,references
@BrianLagunas
@BrianLagunas 3 жыл бұрын
That is correct, however what does a SyncContext do? It essentially allows a thread to communicate with another thread. So when breaking down a complex topic such as threading, I presented it as generalities which could easily be understood. The nuances of the SyncContext and how it works is generally irrelevant when wanting to understand where your continuation task code is running.
@PauloMorgado
@PauloMorgado 3 жыл бұрын
@@BrianLagunas Nope! On ASP.NET it's just because of thread statics. It's not about communicating between threads, but guaranteeing that the data one expects to be attached to the thread is there. It's just a thread pool thread. On client UIs, it's just to guarantee that the code will be running on that thread. It's not an inter thread communication mechanism,
@BrianLagunas
@BrianLagunas 3 жыл бұрын
@@PauloMorgado I look at it differently. I can ask Thread2 for its SynchronizationContext object, give it to Thread1, and then Thread1 can call SynchronizationContext.Send to execute the code on Thread2. In my thought process, that allows me to "communicate" or send data from one thread to another. I don't mean actual communication like some type of bus. Also noting, that not every thread has a SyncContext. As I alluded to, these nuances and technicalities aren't required to give an understanding of where a continuation task is being called and how ConfirgureAwait help controls that.
@PauloMorgado
@PauloMorgado 3 жыл бұрын
@@BrianLagunas in ASP.NET Lots of threads have a SynchronizationContext. And non of them are tied to a thread.
@BrianLagunas
@BrianLagunas 3 жыл бұрын
@@PauloMorgado that's good to know. I don't use ASP.NET, so thanks for sharing your knowledge. It's very helpful.
@AlexS-gn9tq
@AlexS-gn9tq 3 жыл бұрын
Hah. I have had a question about ConfigureAwait at job interview few days ago. Thanks!
@BrianLagunas
@BrianLagunas 3 жыл бұрын
HA! That's funny. I guess this question is more common that I thought.
@VinuP2023
@VinuP2023 3 жыл бұрын
Informative as usual sir :)
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thank you very much
@mallen1846
@mallen1846 3 жыл бұрын
If you have a service that handles all rest get requests that's injected into a viewmodel and called in the viewmodel do you simply add configure await true in the service? Keep in mind the view delegates a command to the viewmodel that ultimately calls the service method. I'm guessing that this is on the UI thread as it all originated from the UI?
@BrianLagunas
@BrianLagunas 3 жыл бұрын
No, the service should be ConfigureAwait(false). Only the consuming code of the service should set ConfigureAwait(true).
@mallen1846
@mallen1846 3 жыл бұрын
@@BrianLagunas perfect, thanks
@DaviBittencourt
@DaviBittencourt 3 жыл бұрын
The best summary of all to date. Great @Brian Lagunas ! Thanks for you do this vídeo !
@BrianLagunas
@BrianLagunas 3 жыл бұрын
@@DaviBittencourt Thank you so much for the kind words.
@chrispybee
@chrispybee 3 жыл бұрын
Hey Brian - great explanation. I have a situation where we have a web page (MVC .NET CORE) and was reading about configureawait(true) vs false for that technology. Would I be right in thinking that for all await calls in the views, we should be using configureawait(true)?
@BrianLagunas
@BrianLagunas 3 жыл бұрын
In general, if you are writing code in an ASP.NET MVC Controller you'll want to use the default of ConfigureAwait(true) becuase it is app-level code.
@chrispybee
@chrispybee 3 жыл бұрын
Brian Lagunas thanks for the reply. Would you say .NET CORE 2.x would be different.
@BrianLagunas
@BrianLagunas 3 жыл бұрын
@@chrispybee I don't see why it would.
@PaulSebastianM
@PaulSebastianM 2 жыл бұрын
Question: Do you need CQRS when you have Application Services that can implement commands and queries as application service methods?
@BrianLagunas
@BrianLagunas 2 жыл бұрын
CQRS is not required
@eugene00777
@eugene00777 3 жыл бұрын
Hey Brian. I noticed that images in xaml create memory leaks. Case: Listbox with images, wait for images to be loaded, then clear collection, memory not releases. Also tried to load images from stream in view model, and then dispose stream, but images still exist in memory. Any ideas please? Also it would be very interesting if you make a video about memory leaks. Thank you
@BrianLagunas
@BrianLagunas 3 жыл бұрын
I'm not familiar with that issue, but I don't really work with images. All my apps are LOB apps focused on data. One thing that comes to mind is to make sure you are binding to a collection that implements INPC. If you don't that will definitely cause a memory leak. You could try freezing the images, or using the DecodePixelWidth to tell WPF to not keep the image data in memory.
@eugene00777
@eugene00777 3 жыл бұрын
1. I use ObservableCollection. 2. I definitely freeze image. Because I am loading images from background thread. 3. I can’t use DecodePixel because I need original images. Thanks for help.
@nishant07kumar
@nishant07kumar 3 жыл бұрын
I think if you make a series on TPL and Async and Await it will be hit :)
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thanks for the tip
@rafaspimenta
@rafaspimenta 3 жыл бұрын
Hi brian, how can I add a red border on textbox to validation a field? It will be nice has a tooltip to show the validation error. Thank you!
@BrianLagunas
@BrianLagunas 3 жыл бұрын
For WPF?
@briannielsbergh
@briannielsbergh 2 жыл бұрын
Great video :)
@BrianLagunas
@BrianLagunas 2 жыл бұрын
Thank you
@jamesbarrow
@jamesbarrow 3 жыл бұрын
Vidoe seems to have a small audio/video lag/sync issue, just at the beginning. Not sure if its just me. Thanks for the video
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Yes, this is an issue that I can ever see myself, but others have noticed. I have since switch microphones and that has seem to fix the problem. Let me know if you see this in my newer videos.
@asitkumarmohanty2579
@asitkumarmohanty2579 Жыл бұрын
This is awesome.
@BrianLagunas
@BrianLagunas Жыл бұрын
Thanks for watching
@heshamabdo6024
@heshamabdo6024 Жыл бұрын
Thank you so much ❤❤❤
@BrianLagunas
@BrianLagunas Жыл бұрын
Thanks for watching
@abbaskhan.786
@abbaskhan.786 Ай бұрын
When the if condition becomes false, then the task is skipped, but the task should not be skipped until the condition becomes true.
@yaroslav7105
@yaroslav7105 2 ай бұрын
У меня не возникает DeadLock как в конце видео, хотя я сделал всё идентично. Я не понимаю почему он должен возникнуть. Почему .ConfigureAwait(true) вдруг должен ждать какого-то ответа от UI потока? Если мы говорим этим выражением, что хотим продолжать код в UI потоке. По логике второй поток должен выполнить дополнительный процесс, закрыться и передать управление обратно UI потоку. С чего бы второму потоку при await ждать первый?
@yaroslav7105
@yaroslav7105 2 ай бұрын
[HttpGet(Name = "GetWeatherForecast")] public async Task Get() { Task x = DoWork(); x.Wait(); return Enumerable.Range(1, 5).Select(index => new WeatherForecast { Date = DateOnly.FromDateTime(DateTime.Now.AddDays(index)), TemperatureC = Random.Shared.Next(-20, 55), Summary = Summaries[Random.Shared.Next(Summaries.Length)] }) .ToArray(); } private async Task DoWork() { Console.WriteLine("Work started"); await Task.Delay(5000); Console.WriteLine("Work finished"); }
@InterRubke
@InterRubke 3 жыл бұрын
I wonder why they have choosen to use ConfigureAwait(true) as a default, as most (or all of my asp.net core code) should benefit from ConfigureAwait(false). When working with UI code you are probably more aware of the UI thread switching.
@BrianLagunas
@BrianLagunas 3 жыл бұрын
That's a great question. I don't have a lot of experience with ASP.NET, but it never made sense to me for ConfigureAwait to be true by default.
@InterRubke
@InterRubke 3 жыл бұрын
@@BrianLagunas However i shoot nyself in the foot using it in combination with IDurableOrchestrationContext, the orchestrator was not happy
@harsheng
@harsheng 3 жыл бұрын
I have one doubt is await creating a thread? As you told it is executing in worker thread
@BrianLagunas
@BrianLagunas 3 жыл бұрын
The async and await keywords don't cause additional threads to be created. Task.Run will schedule the work to be executed in the ThreadPool.
@torreygarland14
@torreygarland14 2 жыл бұрын
do these same rules apply for MVC/Blazor web applications?
@BrianLagunas
@BrianLagunas 2 жыл бұрын
Well, not usually, but there are some cases where you will need to use it. If there is ever a custom SynchronizationContext or TaskScheduler present you'll need to consider it.
@manofqwerty
@manofqwerty Жыл бұрын
Basically all of the C# code I write is backend stuff, does this have any use case when not implementing a UI?
@BrianLagunas
@BrianLagunas Жыл бұрын
Not really. However, if you are using custom synchronization contexts then yes.
@mrjamiebowman1337
@mrjamiebowman1337 3 жыл бұрын
Besides UI/Apps.. how does this affect things like APIs? Also.. you should post a working repo of this... I wasn't able to replicate it myself. I had no issues...
@BrianLagunas
@BrianLagunas 3 жыл бұрын
API's don't really have to worry about this at all. It is really only needed when you are returning to a UI context where the issue happens. I am trying to think of the best way to provide these samples, thinking about maintenance, discoverability, and how easy it is to get them. Maybe just starting a KZbin Samples repo and putting them all under there?
@mrjamiebowman1337
@mrjamiebowman1337 3 жыл бұрын
@@BrianLagunas I would appreciate that. I don't do al ot of UI development but I do see this in a lot of code that I use and I'm always confused by what it does... and how it works.
@VladyslavPavliuk
@VladyslavPavliuk 2 жыл бұрын
What about Asp.Net? In which cases should we use .ConfugureAwait(false) there?
@BrianLagunas
@BrianLagunas 2 жыл бұрын
AspNet isn't an issue because you don't have a UI thread
@yevheniytymchishin8401
@yevheniytymchishin8401 3 жыл бұрын
How to close window from view model in WPF app?
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Ohhh... There are a few ways to do this. I wonder which way I should show you :)
@lerocher2182
@lerocher2182 3 жыл бұрын
Cooool... Hi Brian, How can i Configure or Add Interface Services for dependency injection in Wpf App? Please :)
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Well, thats a complex topic overall, but essentially you'll need to choose a DI container, add it to your project, and configure it according to its documentation.
@satyad833
@satyad833 3 жыл бұрын
excellent
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thank you! Cheers!
@TinoCav
@TinoCav 3 жыл бұрын
How do you handle a cancellable task?
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Great question! And just in time. I was wondering what my next video would be 😀
@KunalMukherjee3701
@KunalMukherjee3701 3 жыл бұрын
Make a playlist on the TPL
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thanks for the suggestion
@mahmoudalaskalany
@mahmoudalaskalany 3 жыл бұрын
I have a question I have a number of users that may be from 10 to 2000 and i want to send to them sms and for each sms sent to user i need to insert it in database How to implement this without forcing the ui user to wait for all of these 2000 sms to be sent
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Simple, send your SMS asynchronously.
@mahmoudalaskalany
@mahmoudalaskalany 3 жыл бұрын
@@BrianLagunas there is a problem in api from sms provider that is send only one message per time not a bulk message and if i send more than 30 message it crash i have to wait for 2 seconds between each 30 message so how to handle this situation
@BrianLagunas
@BrianLagunas 3 жыл бұрын
I'm sorry, that's not something I can help you with. I do not have all the information and context about the problem or the environment required.
@sergiotardo
@sergiotardo 3 жыл бұрын
thanks!!!!!
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thank you for watching
@cburys
@cburys Жыл бұрын
what's the default behavior if you don't use ConfigureAwait?
@Unison_007
@Unison_007 2 жыл бұрын
Спасибо!!!
@BrianLagunas
@BrianLagunas 2 жыл бұрын
Пожалуйста
@ojasteredesai7827
@ojasteredesai7827 3 жыл бұрын
if you have super complex question. just ask to Brian Lagunas and BOOM.. you will get an answer super easy to understand !!!!! :) Thanks a lot !!
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thank you so much!
@Chris-xl3ly
@Chris-xl3ly 2 жыл бұрын
Omg thank you
@BrianLagunas
@BrianLagunas 2 жыл бұрын
You're very welcome. Thanks for watching
@nipundesilva3518
@nipundesilva3518 3 жыл бұрын
nice
@BrianLagunas
@BrianLagunas 3 жыл бұрын
Thanks for watching
@dmitrykim3096
@dmitrykim3096 9 ай бұрын
Glad that .Net Core got rid of synchronizaton context and we don't need to do that.
@BrianLagunas
@BrianLagunas 8 ай бұрын
But platforms like WPF and WinForms do. So if you’re writing library code you still have to worry about it.
@ScottKFraley
@ScottKFraley 2 жыл бұрын
At the risk of being super pedantic, please define "coding on the UI." As in, are you talking about code within a Razor View [page], within a Controller, or...? (Thanks!)
@ScottKFraley
@ScottKFraley 2 жыл бұрын
Okay, now that I've actually gone ahead and watched the video ( ;-) ), I'm guessing you mean in any WinForms or WPF button handler, et al, yes?
@BrianLagunas
@BrianLagunas 2 жыл бұрын
@@ScottKFraley more specifically the UI thread of a Windows app.
@IvarDaigon
@IvarDaigon 2 жыл бұрын
ConfigureAwait should default to false but it actually defaults to true. This was a poor design decision by Microsoft to sacrifice performance in order to appease beginner developers. The net result is; if you want your application to be very performant, you have to litter the code with ConfigureAwait(false) after every single effing function call. In practice the only time you ever need to use ConfigureAwait(true) is when you are touching UI elements directly because without it you will get cross-thread execution errors when you try to update UI controls via their properties. (Cross thread errors are yet another arbitrary and poor design decision by Microsoft). If your UI is using databinding (MVVM) OR there is no UI (Windows service, web API, console etc) then there is almost never a need to use ConfigureAwait(true) unless it is manipulating bitmaps or something else that is arbitrarily protected from cross thread manipulation. All ConfigureAwait(true) does is force the function to return back to the UI (or calling) thread but only when that thread is free to continue processing.. So it actually causes a bottlenecks in your application which can result in the UI becoming unresponsive if your async functions do a lot of heavy processing. And yes the function name ConfigureAwait() itself was yet another poor design decision by Microsoft because it does not even remotely describe what the function actually does. How about just calling it ReturnToContext() and just making people call it only when they actually want the function to return to the context it was called from.
@BrianLagunas
@BrianLagunas 2 жыл бұрын
Agreed!
@ryanmcgowan3061
@ryanmcgowan3061 2 жыл бұрын
ConfigureAwait should have been named RetainThread. Self explanatory this way.
@BrianLagunas
@BrianLagunas 2 жыл бұрын
Definitely needed a better name
@ThinkingNow
@ThinkingNow 2 жыл бұрын
I wonder why they called it ConfigureAwait instead of something like PreserveContext. It's as if they were planning to have more configuration options and never got around to it.
@BrianLagunas
@BrianLagunas 2 жыл бұрын
I agree. The name makes no sense to me
@a-s733
@a-s733 3 жыл бұрын
seems await is not running on other thread , the thread id looks similar. Or I miss something ...?? no idea... sorry did not get the point.. I think here is the answer.. www.skylinetechnologies.com/Blog/Skyline-Blog/December_2018/async-await-configureawait
@BrianLagunas
@BrianLagunas 3 жыл бұрын
async/await does not mean multiple threads automatically. It's also about synchronization context
@MiningForPies
@MiningForPies Жыл бұрын
ConfigureAwait is a stupidly named method.
@BrianLagunas
@BrianLagunas Жыл бұрын
Agreed
@rollinOnCode
@rollinOnCode Жыл бұрын
interesting....
How to Report Progress with Async/Await in .NET Core 3
6:58
Brian Lagunas
Рет қаралды 24 М.
C# Yield Return: What is it and how does it work?
15:09
Brian Lagunas
Рет қаралды 53 М.
Кәріс өшін алды...| Synyptas 3 | 10 серия
24:51
[柴犬ASMR]曼玉Manyu&小白Bai 毛发护理Spa asmr
01:00
是曼玉不是鳗鱼
Рет қаралды 49 МЛН
Ну Лилит))) прода в онк: завидные котики
00:51
Configuring Await
14:11
Coding Tutorials
Рет қаралды 7 М.
That's NOT How Async And Await Works in .NET!
12:25
Codewrinkles
Рет қаралды 13 М.
C# Async Yield Return: IAsyncEnumerable will change your life!!!
10:13
Await Async Tasks Are Getting Awesome in .NET 9!
9:24
Nick Chapsas
Рет қаралды 85 М.
8 await async mistakes that you SHOULD avoid in .NET
21:13
Nick Chapsas
Рет қаралды 307 М.
Latest Nokia Mobile Phone
0:42
Tech Official
Рет қаралды 491 М.
Will the battery emit smoke if it rotates rapidly?
0:11
Meaningful Cartoons 183
Рет қаралды 1,1 МЛН
как спасти усилитель?
0:35
KS Customs
Рет қаралды 516 М.
С Какой Высоты Разобьётся NOKIA3310 ?!😳
0:43
Pratik Cat6 kablo soyma
0:15
Elektrik-Elektronik
Рет қаралды 8 МЛН