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

Add ActionState::Finally that always runs #35

Open
ndarilek opened this issue Mar 2, 2022 · 2 comments
Open

Add ActionState::Finally that always runs #35

ndarilek opened this issue Mar 2, 2022 · 2 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ndarilek
Copy link
Contributor

ndarilek commented Mar 2, 2022

I have actions that can succeed or fail. Independently of that, they generally need to run some cleanup to ensure that scorers know what has already been handled.

It'd be nice if actions first ran with ActionState::Success or ActionState::Failure, then an ActionState::Final match could handle all my cleanup. Now I'm performing all my cleanup in Success or Failure arms which is a bit confusing, particularly if I want a failure case but don't want to repeat the cleanup.

Thanks!

@zkat zkat added enhancement New feature or request help wanted Extra attention is needed labels Aug 1, 2022
@zkat
Copy link
Owner

zkat commented Dec 9, 2023

I can't think of a good way to implement this that doesn't make Actions dependent on definitely catching a single-frame run.

@ekalosak
Copy link
Contributor

Maybe close as inactive? Or the author could sketch an implementation for feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants