6596323: (fc) ClosedByInterruptException not thrown by the interrupt method (lnx)
Reviewed-by: sherman
This commit is contained in:
parent
f46dc4e70b
commit
06e7bf1f85
@ -43,7 +43,7 @@ class NativeThreadSet {
|
||||
//
|
||||
int add() {
|
||||
long th = NativeThread.current();
|
||||
if (th <= 0)
|
||||
if (th == -1)
|
||||
return -1;
|
||||
synchronized (this) {
|
||||
int start = 0;
|
||||
|
@ -34,14 +34,14 @@ package sun.nio.ch;
|
||||
// upon which Java threads are built, and defines a simple signal mechanism
|
||||
// that can be used to release a native thread from a blocking I/O operation.
|
||||
// On systems that do not require this type of signalling, the current() method
|
||||
// always returns zero and the signal(long) method has no effect.
|
||||
// always returns -1 and the signal(long) method has no effect.
|
||||
|
||||
|
||||
class NativeThread {
|
||||
|
||||
// Returns an opaque token representing the native thread underlying the
|
||||
// invoking Java thread. On systems that do not require signalling, this
|
||||
// method always returns zero.
|
||||
// method always returns -1.
|
||||
//
|
||||
static native long current();
|
||||
|
||||
|
@ -31,7 +31,7 @@ package sun.nio.ch;
|
||||
|
||||
class NativeThread {
|
||||
|
||||
static long current() { return 0; }
|
||||
static long current() { return -1; }
|
||||
|
||||
static void signal(long nt) { }
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
||||
*/
|
||||
|
||||
/* @test
|
||||
* @bug 4460583 4470470 4840199 6419424
|
||||
* @bug 4460583 4470470 4840199 6419424 6596323
|
||||
* @summary Comprehensive test of asynchronous closing and interruption
|
||||
* @author Mark Reinhold
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user