< prev index next >

src/java.base/unix/classes/sun/nio/ch/SinkChannelImpl.java

Print this page

        

*** 75,86 **** public int getFDVal() { return fdVal; } ! SinkChannelImpl(SelectorProvider sp, FileDescriptor fd) { super(sp); this.fd = fd; this.fdVal = IOUtil.fdVal(fd); } /** --- 75,87 ---- public int getFDVal() { return fdVal; } ! SinkChannelImpl(SelectorProvider sp, FileDescriptor fd) throws IOException { super(sp); + IOUtil.configureBlocking(fd, false); this.fd = fd; this.fdVal = IOUtil.fdVal(fd); } /**
*** 121,132 **** assert state < ST_CLOSING; state = ST_CLOSING; if (!tryClose()) { long th = thread; if (th != 0) { nd.preClose(fd); ! NativeThread.signal(th); } } } } --- 122,136 ---- assert state < ST_CLOSING; state = ST_CLOSING; if (!tryClose()) { long th = thread; if (th != 0) { + if (NativeThread.isFiber(th)) + Poller.stopPoll(fdVal); nd.preClose(fd); ! if (NativeThread.isKernelThread(th)) ! NativeThread.signal(th); } } } }
< prev index next >