Tad
Tad

Reputation: 838

process wait for does not return

I am having a similar issue as in this similar question The solution they propose is to attach a buffered reader. This is not what I want - I am not interested in the output the process produces. If I run the program with buffered reader, reading from output takes 90% of the execution time and I would want to avoid this bottleneck. Any ideas?

Upvotes: 0

Views: 180

Answers (1)

user207421
user207421

Reputation: 310860

The 'workaround' is to consume the process's output. You don't have any choice about that unless you can arrange for it to be redirected to the null device. If you don't care what it is, use an input stream, not a reader, to save the character conversion overhead. NB at present not consuming the output is taking 100% of the execution time ...

Upvotes: 3

Related Questions