Examples of waitReadable()


Examples of org.jruby.util.io.OpenFile.waitReadable()

                        //                arg.len = len;
                        //                rb_str_locktmp_ensure(str, read_internal_call, (VALUE)&arg);
                        //                n = arg.len;
                        n = OpenFile.readInternal(context, fptr, fptr.fd(), strByteList.unsafeBytes(), strByteList.begin(), len);
                        if (n < 0) {
                            if (!nonblock && fptr.waitReadable(context))
                                continue again;
                            if (nonblock && (fptr.errno() == Errno.EWOULDBLOCK || fptr.errno() == Errno.EAGAIN)) {
                                if (noException)
                                    return runtime.newSymbol("wait_readable");
                                else
View Full Code Here

Examples of org.jruby.util.io.OpenFile.waitReadable()

        if (fptr.readPending() != 0) return runtime.getTrue();
        // TODO: better effort to get available bytes from our channel
//        if (!FIONREAD_POSSIBLE_P(fptr->fd)) return Qfalse;
        // TODO: actually use timeout
        i = fptr.waitReadable(context, tv);
        fptr.checkClosed();
//        if (ioctl(fptr->fd, FIONREAD, &n)) rb_sys_fail(0);
//        if (n > 0) return io;
        if (i) return io;
        return context.nil;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.