PHP 中的执行时间与空闲时间

发布于 2024-10-10 22:57:30 字数 386 浏览 0 评论 0原文

这更多的是一个理论问题。

当我运行执行 passthru 对于其他程序,比如 Java 应用程序,我们假设程序运行了 30 分钟,然后优雅地结束,并且 PHP 每次都在循环中调用它...

... PHP 保持空闲状态的时间等待Java计为执行时间还是空闲时间?

This is more of a theoretical question.

When I run a PHP script that does a passthru to some other program, say a Java application, let's assume that program works for 30 minutes and then ends gracefully and PHP keeps calling it in a loop every single time...

... does the time PHP stays idle waiting for Java count as execution time or as idle time?

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

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

发布评论

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

评论(2

萌吟 2024-10-17 22:57:30

此手册页似乎表明在 Windows 上时间很重要作为执行时间,而在 Linux 上则不会。

This manual page seems to indicate that on Windows the time will count as execution time, whereas on Linux it will not.

尽揽少女心 2024-10-17 22:57:30

据我所知,PHP 将等待(空闲)输出,直到满足最大执行时间。然后该过程将终止。

编辑:我错了。 PHP 将挂起,直到程序通过 passthru 函数关闭,无论执行时间如何。我想念阅读文档。请参阅 http://php.net/manual/en/function.passthru.php< 上的注释/a>

As far as I know, PHP will wait (be idle) for the output until the maximum execution time is met. Then the process will terminate.

Edit: I was wrong. PHP will hang until the program closes with the passthru function, regardless of the execution time. I miss read the documentation. See notes on http://php.net/manual/en/function.passthru.php

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