关于Process.waitFor的问题 [英] A question about Process.waitFor

查看:89
本文介绍了关于Process.waitFor的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

查看我的代码段。

Have a look at my code snippet.

展开 | 选择 | Wrap | 行号

推荐答案

阅读在其他线程中处理''输出和错误流,因为如果你的主要
线程与进程''线程同步,那么可以从该进程得到更多输出。

你写的是什么不行。


亲切的问候,


Jos
Read the process'' output and error stream in other threads because if your main
thread syncs with the process'' thread more output can follow from that process.
What you wrote doesn''t work.

kind regards,

Jos


展开 | 选择 | Wrap | 行号



在其他线程中读取进程的输出和错误流,因为如果你的主要的
线程与进程''线程同步,那么更多输出可以从该进程开始。

你写的什么都行不通。


亲切的问候,


Jos
Read the process'' output and error stream in other threads because if your main
thread syncs with the process'' thread more output can follow from that process.
What you wrote doesn''t work.

kind regards,

Jos



感谢您的帮助Josh。

所以你的意思是说错误流或输出流的读取...在单独的线程中执行,并且子进程运行在一个单独的线程中。

因为如果你的主要

线程与进程''线程同步,更多输出可以从该进程跟随请在这里给我更多详细信息?

什么代码没有运行,我没有收到你。

Thanks for your help Josh.
So you mean to say that the reading of error stream or output stream ...executes in separate thread, And the subprocess runs in a separate thread.
"because if your main
thread syncs with the process'' thread more output can follow from that process" Please could give me more details here ?
And what code is not running, i am not getting you.


这篇关于关于Process.waitFor的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆