Skip to content

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.

@He-Pin He-Pin added this to the 2.0.0-M1 milestone Aug 25, 2025
@pjfanning
Copy link
Member

@Roiocam @He-Pin is this something that could be finished and added to main branch?

@He-Pin
Copy link
Member

He-Pin commented Sep 3, 2025

@Roiocam Would you like to polish this?

@He-Pin
Copy link
Member

He-Pin commented Sep 3, 2025

btw, I think we can polish more around:
refs: https://smallrye.io/smallrye-mutiny/latest/

request.ifNoItem().after(ofMillis(100))
    .failWith(() -> new TooSlowException("💥"))
    .onFailure(IOException.class).recoverWithItem(fail -> "📦")
    .subscribe().with(
        item -> log("👍 " + item),
         err -> log(err.getMessage())
    );

@He-Pin He-Pin added the t:typed Typed Actor label Sep 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

t:typed Typed Actor

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants