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

Support Timeout.InfiniteTimeSpan in grain delay deactivation #8711

Merged
merged 1 commit into from
Nov 9, 2023

Conversation

nichvolodov
Copy link
Contributor

@nichvolodov nichvolodov commented Nov 9, 2023

grain.DelayDeactivation(Timeout.InfiniteTimeSpan) work incorrect

Microsoft Reviewers: Open in CodeFlow

@ReubenBond ReubenBond merged commit 6584ba9 into dotnet:main Nov 9, 2023
19 checks passed
@ReubenBond
Copy link
Member

Great, thank you, @nichvolodov!

@@ -396,12 +396,12 @@ internal List<Message> DequeueAllWaitingRequests()

public void DelayDeactivation(TimeSpan timespan)
{
if (timespan <= TimeSpan.Zero)
if (timespan <= TimeSpan.Zero && timespan != Timeout.InfiniteTimeSpan)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code could be a little simplified by swapping this with the else if, so that InfiniteTimeSpan only needs to be checked once.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changed in #8712

@github-actions github-actions bot locked and limited conversation to collaborators Dec 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants