mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8200256: java/nio/channels/AsynchronousChannelGroup/Basic.java fails intermittently
Reviewed-by: chegar
This commit is contained in:
parent
debaf13f38
commit
704b2ccd93
8 changed files with 57 additions and 17 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 2008, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2008, 2018, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
|
@ -60,8 +60,8 @@ abstract class AsynchronousChannelGroupImpl
|
|||
// associated Executor for timeouts
|
||||
private ScheduledThreadPoolExecutor timeoutExecutor;
|
||||
|
||||
// task queue for when using a fixed thread pool. In that case, thread
|
||||
// waiting on I/O events must be awokon to poll tasks from this queue.
|
||||
// task queue for when using a fixed thread pool. In that case, a thread
|
||||
// waiting on I/O events must be awoken to poll tasks from this queue.
|
||||
private final Queue<Runnable> taskQueue;
|
||||
|
||||
// group shutdown
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue