Skip to content

Conversation

@Timongcraft
Copy link
Contributor

some users (2) came confused in the velocity channels because they didn't understand this example so this should be more self-explanatory

some users (2) came confused in the velocity channels because they didn't understand this example
@github-actions
Copy link

github-actions bot commented Jan 19, 2026

built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
papermc-docs ✅ Ready (View Log) Visit Preview bf1c2c3

Copy link
Member

@Strokkur424 Strokkur424 left a comment

Choose a reason for hiding this comment

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

Is this really 'explained' better though? The added doSomeAsyncProcession method definitely helps in understanding the code flow, though the continuation method names being pretty descriptive made the original logic almost easier to understand, as there was no if/else involved.

Furthermore, discarding lambda parameters _ are a recent Java feature. I am not entirely certain if we should include that in the docs at this point, as I suspect most code bases still being centered around Java 21.

I personally think that if people really have problems with async handling, the following section, which tries to explain the continuation system, should be improved, if anything. Another possible solution might be to add some comments to actually explain which part is executed when and what the result of it is.

@Timongcraft
Copy link
Contributor Author

The thing is that the previous example used code used an external lib not well known or was supposed to represent a concept that some users didn't understand this makes it clear and also shows how the resume methods are used.

Also the _ will be highlighted by Intellij if it isn't possible so that shouldn't be a problem. (This is Java 22+, Velocity is Java 17)
Can change this though if desired

Copy link
Member

@zlataovce zlataovce left a comment

Choose a reason for hiding this comment

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

lgtm

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