In a Groovy script, is the eachLine closure sufficient to keep a process from blocking due to a full buffer?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Of course it depends from the different complexities of the the two processes.
I guess that one is the one that produces output, while the other one consumes it with
eachLine. Then if the second one has enough CPU time to prevent the buffer from filling, you won’t have any block. Otherwise it will slowly/fastly fill until there is no room anymore.There is no general answer in your case since it depends from the processing done by
eachLineand the one made by the other process which produces data.