Repository navigation
refactor: Async recursive handler - #461
matthieubosquet wants to merge 1 commit into
Conversation
|
@matthieubosquet What problem are we solving here—do you have an example of what is broken with the waterfall and what needs fixing? In general, I would suggest to always create an issue first to describe the problem, and then have a PR that is a solution. |
|
In the WaterfallHandler, the canHandle and handle functions aren't really usable as is. Therefore they're just duplicating/misleading code here to conform to the interface, which seems wrong (they are not called and probably shouldn't ever, which also is misleading). |
They are though. They work and conform to the contract.
So is the issue that there is a performance overhead?
Me too 🙂 We're not breaking it.
We're not deviating.
This PR would make all handlers deviate for one specific performance optimization, for which a solution already exists. |
513d754 to
27a5711
Compare
|
I think you're right Ruben. Thanks for the explanation! :) |
This allows following the regular pattern of canHandle/handle with handlers that are recursive.
It fixes the Waterfall. I think I can simplify the Sequence one as well if this is ok.