如何在 Lithium 中并行运行过滤器?
有没有办法通过让过滤器返回承诺来并行运行过滤器,就像 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
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?