Skip to content

Execute Around - use lambda#791

Merged
npathai merged 1 commit into
iluwatar:masterfrom
er2:executeAroundLambda
Sep 8, 2018
Merged

Execute Around - use lambda#791
npathai merged 1 commit into
iluwatar:masterfrom
er2:executeAroundLambda

Conversation

@er2
Copy link
Copy Markdown
Contributor

@er2 er2 commented Sep 6, 2018

Refactor the Execute Around pattern to use a lambda. Lambdas make such patterns feel lighter weight.

I first heard about this pattern in a talk by Venkat Subramanian. The thrust of the talk was that lambdas made such patterns nicer.

I extracted the lambda to its own variable to make clearer the type it's implementing.

Comment thread execute-around/src/main/java/com/iluwatar/execute/around/App.java
@er2 er2 force-pushed the executeAroundLambda branch from fd5400e to ec6d2a8 Compare September 8, 2018 02:31
Copy link
Copy Markdown

@IAmPramod IAmPramod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now!

@npathai
Copy link
Copy Markdown
Contributor

npathai commented Sep 8, 2018

@er2 Seems good to go. Thanks for the PR.

@npathai npathai merged commit 9e56e5c into iluwatar:master Sep 8, 2018
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.

3 participants