chore: better show Velocity's async handling#717
Conversation
some users (2) came confused in the velocity channels because they didn't understand this example
built with Refined Cloudflare Pages Action⚡ Cloudflare Pages Deployment
|
Strokkur424
left a comment
There was a problem hiding this comment.
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.
|
The thing is that the previous example used Netty, which 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) |
some users (2) came confused in the velocity channels because they didn't understand this example so this should be more self-explanatory