-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Description
Hello guys, i work since two years to migrate a silverlight app in blazor. Im now close to put this on production but i still have a big problem before release : it seem when a wcf service is called (we don't migrate the backend for now), the others are in "pending" and wait the first has been completed before execute the call.
I already made some research and found it can be considered as a normal behavior because of the single thread behavior of webassemby
https://docs.microsoft.com/en-us/aspnet/core/blazor/components/?view=aspnetcore-5.0#synchronization-context
At this point i can separate two types of calling and priorize them :
- asynchronous with results : its better but not mandatory. It's a regression from silverlight app but i can deal with that (even if i hope you will make this working soon, like .NET 6.0, because its a really important functionnality of modern app). So if you think its possible now in blazor, please share some tips on how we can implement that.
- asynchronous without results : To be more precise, have the ability to call a one-way service during another one (which this last one waiting for results)
The reason of this behavior is we have an "ImAlive" service launch by a timer on client side. This OneWay service is here to prevent user be disconnected on the wcf server if he do nothing on the app (for this scenario its ok because i dont wait for another thing), and also being user not disconnected during long treatment (for this one its a no-go).
I already try to put some .ConfigureAwait(false) as i see on different blog/forums everywhere in my chain of async/await but its change nothing (on my LongTreatmentWithResult service and on my ImAlive service).
Because my ImAlive service is OneWay and i don't need to wait for him, i was thinking remove all the await before the calls (chain of calling) of my ImAlive service would made this working (i have warnings on my call with this but if its work...). But even with this its not work, i never reached the wcf server until the LongTreatment have completed.
So guys have you a solution for me ? Thanks for your help