public void waitUntilReady() throws IOException, InterruptedException { stream.waitUntilReady(); }
public void waitUntilReady() throws IOException, InterruptedException { stream.waitUntilReady(); }
public void waitUntilReady() throws IOException, InterruptedException { stream.waitUntilReady(); }
public void waitUntilReady() throws IOException, InterruptedException { stream.waitUntilReady(); }
/** * waits until input available or timed out and returns self, or nil when EOF reached. */ @JRubyMethod public static IRubyObject io_wait(ThreadContext context, IRubyObject obj) { RubyIO io = (RubyIO)obj; try { OpenFile openFile = io.getOpenFile(); if (openFile.getMainStreamSafe().feof()) { return context.runtime.getNil(); } openFile.getMainStreamSafe().waitUntilReady(); } catch (BadDescriptorException e) { throw context.runtime.newErrnoEBADFError(); } catch (Exception anyEx) { return context.runtime.getNil(); } return obj; } }
/** * waits until input available or timed out and returns self, or nil when EOF reached. */ @JRubyMethod public static IRubyObject io_wait(ThreadContext context, IRubyObject obj) { RubyIO io = (RubyIO)obj; try { OpenFile openFile = io.getOpenFile(); if (openFile.getMainStreamSafe().feof()) { return context.runtime.getNil(); } openFile.getMainStreamSafe().waitUntilReady(); } catch (BadDescriptorException e) { throw context.runtime.newErrnoEBADFError(); } catch (Exception anyEx) { return context.runtime.getNil(); } return obj; } }