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

Use BusyHelper for IsBusy change #3936

Closed
StefanOssendorf opened this issue May 13, 2024 · 2 comments · Fixed by #3953
Closed

Use BusyHelper for IsBusy change #3936

StefanOssendorf opened this issue May 13, 2024 · 2 comments · Fixed by #3953
Assignees

Comments

@StefanOssendorf
Copy link
Contributor

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

This should be replaced by the BusyHelper class from Csla.Core to avoid the spin wait.

@Freelancingonupwork
Copy link
Contributor

Hello.
csla/Source/Csla/Core/BusyHelper.cs is internal static class. so, I can not use this class in Csla.Blazor due to it's protection level.

@ossendorf-at-hoelscher
Copy link

Hi. You can make the BusyHelper public to use it there.
Cheers Stefan

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging a pull request may close this issue.

3 participants