8200256: java/nio/channels/AsynchronousChannelGroup/Basic.java fails intermittently

Reviewed-by: chegar
This commit is contained in:
Alan Bateman 2018-03-27 19:29:46 +01:00
parent debaf13f38
commit 704b2ccd93
8 changed files with 57 additions and 17 deletions

View file

@ -401,8 +401,17 @@ public class IOUtil {
static native int write1(int fd, byte b) throws IOException;
/**
* Read and discard all bytes.
*/
static native boolean drain(int fd) throws IOException;
/**
* Read and discard at most one byte
* @return the number of bytes read or IOS_INTERRUPTED
*/
static native int drain1(int fd) throws IOException;
public static native void configureBlocking(FileDescriptor fd,
boolean blocking)
throws IOException;