Sync over Async Issue [FeatureChecker]
See original GitHub issue- Current Version
- .Net Core.
- Remove Feature and Check Tenant for the removed feature in separate async method not returning expected results.
In this file src/Abp/Application/Features/FeatureChecker.cs
public Task<string> GetValueAsync(string name)
is not async and what it calls
return GetValueAsync(AbpSession.TenantId.Value, name);
is not awaited.
I’m trying to remove a feature from a tenant, and then checking it seperatly in another method. When i check the if the tenant has the feature it exists when it is not supposed to exist.
I believe because the method mentioned above isn’t async the Task jumps back up before completion and is displaying the “old” value upon trying to read the value from the DB.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Fixing sync over async issues in .NET
Hi. Early on you state that the problem with DoAsyncOperationWell().Result is that we tied up two threads. Is that true if you're calling ......
Read more >The sync over async issue is a real common problem for ...
The sync over async issue is a real common problem for me when trying to get a large older codebase converted to async...
Read more >Detecting Sync over Async Code in ASP.NET Core
Not properly awaiting async calls can lead to thread pool starvation. Most often caused by sync over async code. Here's how you can...
Read more >Fixing sync over async issues in .NET / C# with Visual Studio ...
Asynchronous programming has been around for several years on the .NET platform but has historically been very difficult to do well.
Read more >feature management documentation
The IsEnabledAsync and other methods also have sync versions. The IsEnabled method should be used for boolean type features, otherwise you may get...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks, I will download your code and try to solve it.
@maliming Working on Test Project now.