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

feat: avoid nesting in Behavior Factories #1459

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Roiocam
Copy link
Member

@Roiocam Roiocam commented Aug 29, 2024

similar like #1444, but apply to timer and stash:

those nestings are pretty annoying, especially when i using AOSP format.

-          Behaviors.withTimers(t-> 
-              Behaviors.setup(ctx-> {
-                   // preStart something on here
-                  return new BehaviorXX();
-           }));
+          Behaviors.withTimersSetup((t, ctx) -> {
+             // preStart something on here
+              return new BehaviorXX();
+          });

@He-Pin
Copy link
Member

He-Pin commented Sep 2, 2024

@Roiocam Thanks, Tests is required too.

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.

2 participants