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

polish(statetree): accept a context in statetree diff for timeouts #6639

Merged
merged 1 commit into from
Jul 5, 2021

Conversation

frrist
Copy link
Member

@frrist frrist commented Jun 30, 2021

  • this operation can take a while, this change gives users the option
    to abort if it takes "too long".

Motivation: this operation takes a while for sentinel to perform, we'd like to abort if it takes too long.

@iand if this looks alright to you I'll tag lotus devs for a second look

- this operation can take a while, this changes gives users the option
to abort if it takes "too long".
@frrist frrist self-assigned this Jun 30, 2021
@frrist frrist requested a review from iand June 30, 2021 23:56
@iand
Copy link
Contributor

iand commented Jul 1, 2021

This is the pattern I expected, so 👍 from me

return ctx.Err()
default:
var act types.Actor

Copy link
Contributor

Choose a reason for hiding this comment

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

I would normally close the select here with the default case being essentially a no-op. The context check then becomes like an early return.

@magik6k magik6k merged commit 97207df into master Jul 5, 2021
@magik6k magik6k deleted the frrist/context-in-statetree-diff branch July 5, 2021 15:30
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.

3 participants