<bdo id='2huEx'></bdo><ul id='2huEx'></ul>

  • <legend id='2huEx'><style id='2huEx'><dir id='2huEx'><q id='2huEx'></q></dir></style></legend>

    <small id='2huEx'></small><noframes id='2huEx'>

    <i id='2huEx'><tr id='2huEx'><dt id='2huEx'><q id='2huEx'><span id='2huEx'><b id='2huEx'><form id='2huEx'><ins id='2huEx'></ins><ul id='2huEx'></ul><sub id='2huEx'></sub></form><legend id='2huEx'></legend><bdo id='2huEx'><pre id='2huEx'><center id='2huEx'></center></pre></bdo></b><th id='2huEx'></th></span></q></dt></tr></i><div id='2huEx'><tfoot id='2huEx'></tfoot><dl id='2huEx'><fieldset id='2huEx'></fieldset></dl></div>
    1. <tfoot id='2huEx'></tfoot>

        并行执行多个PHP脚本,完成时得到通知

        Executing multiple PHP scripts in parallel, and being notified when finished(并行执行多个PHP脚本,完成时得到通知)

          <bdo id='eu1Jy'></bdo><ul id='eu1Jy'></ul>

          <small id='eu1Jy'></small><noframes id='eu1Jy'>

            <tfoot id='eu1Jy'></tfoot>

                <legend id='eu1Jy'><style id='eu1Jy'><dir id='eu1Jy'><q id='eu1Jy'></q></dir></style></legend>

                  <tbody id='eu1Jy'></tbody>

                <i id='eu1Jy'><tr id='eu1Jy'><dt id='eu1Jy'><q id='eu1Jy'><span id='eu1Jy'><b id='eu1Jy'><form id='eu1Jy'><ins id='eu1Jy'></ins><ul id='eu1Jy'></ul><sub id='eu1Jy'></sub></form><legend id='eu1Jy'></legend><bdo id='eu1Jy'><pre id='eu1Jy'><center id='eu1Jy'></center></pre></bdo></b><th id='eu1Jy'></th></span></q></dt></tr></i><div id='eu1Jy'><tfoot id='eu1Jy'></tfoot><dl id='eu1Jy'><fieldset id='eu1Jy'></fieldset></dl></div>
                1. 本文介绍了并行执行多个PHP脚本,完成时得到通知的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  所以,这就是我想要做的 - 实际上不言自明:

                  So, that's what I'm trying to do - pretty self-explanatory actually :

                  • 启动 X 个同时"进程(每个进程都绑定到不同的 php 脚本)
                  • 能够说全部什么时候完成
                  • Initiate X 'simultaneous' processes (each bound to a different php script)
                  • Be able to say when all of them are finished

                  我已经研究了各种不同的方法,我可能会使用 exec 和后台进程.(关于这些行).

                  I've had a look at various different approaches, and I'm probably going to use exec and background processes. (Something along these lines).

                  事情 - 我真的无法理解 - 是:

                  The thing - which I really can't get my head around - is :

                  我不知道哪种方法是检查所有进程是否完成的最有效方法 (能够密切关注总体进度 - 例如 X out ofY完了,也是必须的).

                  重要的是时间效率,而且——显然——不会造成任何不必要的服务器过载(所以,我想任何冻结"while 循环检查实时pids,即使每隔一段时间,也是不可能的,对吧?)

                  What is important is time-efficiency, and - obviously - not causing any unnecessary server overload (so, I suppose any 'frozen' while loop checking for live pids, even if at intervals, is out of the question, right?)

                  非常欢迎任何建议!

                  PS:我最初是通过从客户端开始的异步 Ajax 请求来设置这一切的,但我目前正在考虑完全迁移到非 javascript-服务器端环境.并行处理的问题仍然存在......

                  P.S.: I've initially set this whole thing up with asynchronous Ajax requests starting from the client-side, but I'm currently considering a migration to a non-javascript fully-server-side environment. The issue with parallel-processing though remains...

                  推荐答案

                  您应该调查 pcntl_fork 和相关功能.这允许一个主进程形成多个子进程并被通知子进程退出状态.

                  You should investigate the pcntl_fork and related functions. This allows one master process to form a number of child processes and be notified of child exit status.

                  http://php.net/manual/en/function.pcntl-fork.php

                  这篇关于并行执行多个PHP脚本,完成时得到通知的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  本站部分内容来源互联网,如果有图片或者内容侵犯了您的权益,请联系我们,我们会在确认后第一时间进行删除!

                  相关文档推荐

                  DeepL的翻译效果还是很强大的,如果我们要用php实现DeepL翻译调用,该怎么办呢?以下是代码示例,希望能够帮到需要的朋友。 在这里需要注意,这个DeepL的账户和api申请比较难,不支持中国大陆申请,需要拥有香港或者海外信用卡才行,没账号的话,目前某宝可以
                  PHP通过phpspreadsheet导入Excel日期,导入系统后,全部变为了4开头的几位数字,这是为什么呢?原因很简单,将Excel的时间设置问文本,我们就能看到该日期本来的数值,上图对应的数值为: 要怎么解决呢?进行数据转换就行,这里可以封装方法,或者用第三方的
                  mediatemple - can#39;t send email using codeigniter(mediatemple - 无法使用 codeigniter 发送电子邮件)
                  Laravel Gmail Configuration Error(Laravel Gmail 配置错误)
                  Problem with using PHPMailer for SMTP(将 PHPMailer 用于 SMTP 的问题)
                  Issue on how to setup SMTP using PHPMailer in GoDaddy server(关于如何在 GoDaddy 服务器中使用 PHPMailer 设置 SMTP 的问题)

                    <tbody id='3qxXn'></tbody>

                      <i id='3qxXn'><tr id='3qxXn'><dt id='3qxXn'><q id='3qxXn'><span id='3qxXn'><b id='3qxXn'><form id='3qxXn'><ins id='3qxXn'></ins><ul id='3qxXn'></ul><sub id='3qxXn'></sub></form><legend id='3qxXn'></legend><bdo id='3qxXn'><pre id='3qxXn'><center id='3qxXn'></center></pre></bdo></b><th id='3qxXn'></th></span></q></dt></tr></i><div id='3qxXn'><tfoot id='3qxXn'></tfoot><dl id='3qxXn'><fieldset id='3qxXn'></fieldset></dl></div>

                      <small id='3qxXn'></small><noframes id='3qxXn'>

                    1. <legend id='3qxXn'><style id='3qxXn'><dir id='3qxXn'><q id='3qxXn'></q></dir></style></legend>

                        <tfoot id='3qxXn'></tfoot>
                        • <bdo id='3qxXn'></bdo><ul id='3qxXn'></ul>