1
21
Fork
You've already forked big-brain
5

Add ActionState::Finally that always runs #35

Open
opened 2022年03月02日 20:43:24 +01:00 by ndarilek · 2 comments
ndarilek commented 2022年03月02日 20:43:24 +01:00 (Migrated from github.com)
Copy link

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!

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!
Owner
Copy link

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

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 commented 2024年05月16日 21:26:11 +02:00 (Migrated from github.com)
Copy link

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

Maybe close as inactive? Or the author could sketch an implementation for feedback?
Sign in to join this conversation.
No Branch/Tag specified
main
zkat/tutorial
zkat/docs
zkat/dorfs-example
big-brain-derive-v0.22.0
v0.22.0
big-brain-derive-v0.21.1
v0.21.1
v0.21.0
v0.20.0
big-brain-derive-v0.19.0
v0.19.0
big-brain-derive-v0.18.0
v0.18.0
big-brain-derive-v0.17.0
v0.17.0
big-brain-derive-v0.16.0
v0.16.0
v0.15.0
v0.14.0
v0.13.0
v0.12.0
v0.11.0
v0.10.0
v0.9.0
v0.8.0
v0.7.0
0.6.0
0.5.0
0.4.0
0.3.5
0.3.4
0.3.3
0.3.2
0.3.1
0.3.0
0.2.1
0.2.0
v0.1.1
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zkat/big-brain#35
Reference in a new issue
zkat/big-brain
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?