如何在 Lithium 中并行运行过滤器?

发布于 2024-12-25 22:05:25 字数 348 浏览 5 评论 0原文

锂的 过滤器是通过链接实现的,因此并行执行似乎是不可能的。

有没有办法通过让过滤器返回承诺来并行运行过滤器,就像 Dojo deferred 所做的那样?

或者是否有另一个具有 AOP 功能的 PHP 框架可以做到这一点?

Lithium's filter has been implemented by chaining so parallel execution doesn't seem to be possible.

Is there a way to run filters in parallel by having the filters return promises as is done with Dojo deferred?

Or is there another PHP framework with AOP functionality that can do this?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦醒灬来后我 2025-01-01 22:05:25

Lithium 的过滤器启用了某种monkeypatching,与推迟任务无关。

推迟任务必须通过其他机制来完成,例如:

由于 PHP 不是线程化的(在正常配置下),因此没有任何并行运行。

您能详细说明您希望异步运行哪种类型的任务吗?

Lithium's filters are enabling some kind of monkeypatching which has nothing to do with deferring tasks.

Deferring tasks has to be done through other mechanisms like:

As PHP isn't threaded (under a normal configuration), nothing run in parallel.

Can you elaborate what kind of tasks would you like to run asynchronously?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文