-
Hello. Is there any way to call to declare an asynchronous handler for "under" or before_dispatch / around_action hooks? Something like
For example, if I need to perform some checks or fill a stash from the database and I want to use async / await in these operations. How can wait non-blocking calls inside hooks or "under" in such a way that the execution is not transferred to the controller/action until all preliminary async operations have been completed? I also want to be able to cancel dispatch chain in such operations. Is it possible? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
I'm afraid it's not that easy yet. The problem is that |
Beta Was this translation helpful? Give feedback.
I'm afraid it's not that easy yet. The problem is that
async/await
are only an optional dependency, so making the router work with it consistently would be very complicated. And backwards compatibility has to be considered as well.