2-phase (cycle?) scanning #5904
Replies: 1 comment 3 replies
-
|
hi! Indeed it's uncommon and somewhat advised against; could you make your use case more concrete? That might help us think through the options with you, as well as what accommodations might be in order. As it stands it's hard to say if you have a convincing case, with how generalized the description is at the moment. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have a use-case where I need the result of one
ScanningRecipe(i.e. its accumulator) in a following scanning recipe. I hacked this by having them sequential in a recipe list and using a static class variable. This is a one-off, one-time use recipe, so we feel OK with a few hacks; however, the general problem might be repeated. I'm curious if I missed a standard approach here.I tried having them in order and putting a message in the ExecutionContext, but that failed with you-should-not-mutate-this message. Pretty sure I saw the backdoor to allow that, but for various reasons, I thought that was worse than using static class state.
I don't see how cycles gives any more state options..
Am I missing some pattern/strategy/etc that could be used for this? Anyone done this in a less hacky way than using static class variables?
Beta Was this translation helpful? Give feedback.
All reactions