Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BusyHelper for IsBusy Change #3953

Conversation

Freelancingonupwork
Copy link
Contributor

@Freelancingonupwork Freelancingonupwork commented May 17, 2024

csla/Source/Csla.Blazor/ViewModel.cs

 if (obj.IsBusy) 
 { 
   var stopTime = DateTime.Now + BusyTimeout; 
   while (obj.IsBusy) 
   { 
     if (DateTime.Now > stopTime) 
       throw new TimeoutException("SaveAsync"); 
     await Task.Delay(1); 
   } 
 } 

Replaced by BusyHelper class from Csla.Core to avoid the spin wait.
Fixes #3936

Source/Csla.Blazor/ViewModel.cs Outdated Show resolved Hide resolved
Source/Csla.Blazor/ViewModel.cs Outdated Show resolved Hide resolved
Source/Csla/Core/BusyHelper.cs Show resolved Hide resolved
Source/Csla.Blazor/ViewModel.cs Outdated Show resolved Hide resolved
Source/Csla.Blazor.Test/ViewModelSaveAsyncErrorTests.cs Outdated Show resolved Hide resolved
Source/Csla.Blazor/ViewModel.cs Outdated Show resolved Hide resolved
Source/Csla.Blazor.Test/ViewModelSaveAsyncErrorTests.cs Outdated Show resolved Hide resolved
@StefanOssendorf
Copy link
Contributor

@Freelancingonupwork Please fix the broken test then we can merge it :)

@Freelancingonupwork
Copy link
Contributor Author

@Freelancingonupwork Please fix the broken test then we can merge it :)

@Freelancingonupwork
Copy link
Contributor Author

Hello,

By mistake I closed the PR. and when I reopened it. builds completed without error.

@rockfordlhotka
Copy link
Member

I have noticed that there is at least one test that sporadically fails. Frustrating!

@rockfordlhotka rockfordlhotka merged commit 7638dfe into MarimerLLC:main May 22, 2024
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use BusyHelper for IsBusy change
3 participants