timothy65535 edited a comment on issue #940:
URL: 
https://github.com/apache/incubator-kyuubi/issues/940#issuecomment-900045139


   > Seems we can sleep a while if read line is null
   
   For `BufferedReader`, we can use `reader.ready()`.
   
   ```
   while (true) {
     if (reader.ready()) {
       var line: String = reader.readLine
       // logic
     } else {
       Thread.sleep(300)
     }
   }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to