diff options
-rw-r--r-- | config/PropertyNames.xml | 1 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.cpp | 3 | ||||
-rw-r--r-- | cpp/src/Ice/PropertyNames.h | 2 | ||||
-rw-r--r-- | cs/src/Ice/PropertyNames.cs | 3 | ||||
-rw-r--r-- | java/src/IceInternal/Outgoing.java | 15 | ||||
-rw-r--r-- | java/src/IceInternal/PropertyNames.java | 3 | ||||
-rw-r--r-- | java/test/Ice/interrupt/AllTests.java | 64 | ||||
-rw-r--r-- | js/src/Ice/PropertyNames.js | 3 |
8 files changed, 78 insertions, 16 deletions
diff --git a/config/PropertyNames.xml b/config/PropertyNames.xml index a1fbae96c90..e5a7298bb3c 100644 --- a/config/PropertyNames.xml +++ b/config/PropertyNames.xml @@ -397,6 +397,7 @@ generated from the section label. <property name="Warn.UnknownProperties" /> <property name="Warn.UnusedProperties" /> <property name="CacheMessageBuffers" /> + <property name="BackgroundIO" /> </section> <section name="IceMX"> diff --git a/cpp/src/Ice/PropertyNames.cpp b/cpp/src/Ice/PropertyNames.cpp index 15d61a08bdf..7c11a5db27b 100644 --- a/cpp/src/Ice/PropertyNames.cpp +++ b/cpp/src/Ice/PropertyNames.cpp @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Aug 13 09:11:52 2014 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Wed Aug 13 15:11:58 2014 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -177,6 +177,7 @@ const IceInternal::Property IcePropsData[] = IceInternal::Property("Ice.Warn.UnknownProperties", false, 0), IceInternal::Property("Ice.Warn.UnusedProperties", false, 0), IceInternal::Property("Ice.CacheMessageBuffers", false, 0), + IceInternal::Property("Ice.BackgroundIO", false, 0), }; const IceInternal::PropertyArray diff --git a/cpp/src/Ice/PropertyNames.h b/cpp/src/Ice/PropertyNames.h index 056730eb3cf..d5b33df89b8 100644 --- a/cpp/src/Ice/PropertyNames.h +++ b/cpp/src/Ice/PropertyNames.h @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Aug 13 09:11:52 2014 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Wed Aug 13 15:11:58 2014 // IMPORTANT: Do not edit this file -- any edits made here will be lost! diff --git a/cs/src/Ice/PropertyNames.cs b/cs/src/Ice/PropertyNames.cs index 801f678ebe8..ac48300f216 100644 --- a/cs/src/Ice/PropertyNames.cs +++ b/cs/src/Ice/PropertyNames.cs @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Aug 13 09:11:52 2014 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Wed Aug 13 15:11:58 2014 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -179,6 +179,7 @@ namespace IceInternal new Property(@"^Ice\.Warn\.UnknownProperties$", false, null), new Property(@"^Ice\.Warn\.UnusedProperties$", false, null), new Property(@"^Ice\.CacheMessageBuffers$", false, null), + new Property(@"^Ice\.BackgroundIO$", false, null), null }; diff --git a/java/src/IceInternal/Outgoing.java b/java/src/IceInternal/Outgoing.java index 545f8f79800..eec1e4eb8f0 100644 --- a/java/src/IceInternal/Outgoing.java +++ b/java/src/IceInternal/Outgoing.java @@ -107,7 +107,7 @@ public final class Outgoing implements OutgoingMessageCallback } catch(Ice.OperationInterruptedException ex) { - if(_handler.requestCanceled(this, new Ice.OperationInterruptedException())) + if(_handler.requestCanceled(this, ex)) { // // Wait for the exception to propagate. It's possible the request handler ignores @@ -134,6 +134,10 @@ public final class Outgoing implements OutgoingMessageCallback } } } + else + { + throw ex; + } } boolean timedOut = false; @@ -183,7 +187,8 @@ public final class Outgoing implements OutgoingMessageCallback if(timedOut) { - if(_handler.requestCanceled(this, new Ice.InvocationTimeoutException())) + Ice.InvocationTimeoutException ex = new Ice.InvocationTimeoutException(); + if(_handler.requestCanceled(this, ex)) { // // Wait for the exception to propagate. It's possible the request handler ignores @@ -199,7 +204,7 @@ public final class Outgoing implements OutgoingMessageCallback { wait(); } - catch(InterruptedException ex) + catch(InterruptedException e) { interrupted = true; } @@ -210,6 +215,10 @@ public final class Outgoing implements OutgoingMessageCallback } } } + else + { + throw ex; + } } if(_exception != null) diff --git a/java/src/IceInternal/PropertyNames.java b/java/src/IceInternal/PropertyNames.java index 13b03bc9b20..0d80e319830 100644 --- a/java/src/IceInternal/PropertyNames.java +++ b/java/src/IceInternal/PropertyNames.java @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Aug 13 09:11:52 2014 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Wed Aug 13 15:11:58 2014 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -179,6 +179,7 @@ public final class PropertyNames new Property("Ice\\.Warn\\.UnknownProperties", false, null), new Property("Ice\\.Warn\\.UnusedProperties", false, null), new Property("Ice\\.CacheMessageBuffers", false, null), + new Property("Ice\\.BackgroundIO", false, null), null }; diff --git a/java/test/Ice/interrupt/AllTests.java b/java/test/Ice/interrupt/AllTests.java index 69644e735b0..bab1865f1cb 100644 --- a/java/test/Ice/interrupt/AllTests.java +++ b/java/test/Ice/interrupt/AllTests.java @@ -31,7 +31,6 @@ public class AllTests { CallbackBase() { - _called = false; } public synchronized void check() @@ -57,7 +56,31 @@ public class AllTests notify(); } - private boolean _called; + public synchronized void checkResponse() + { + while(!_response) + { + try + { + wait(); + } + catch(InterruptedException ex) + { + } + } + + _response = false; + } + + public synchronized void response() + { + assert(!_response); + _response = true; + notify(); + } + + private boolean _called = false; + private boolean _response = false; } private static void @@ -93,7 +116,13 @@ public class AllTests try { p.op(); - test(false); + // + // It is possible that the thread isn't interrupted. However, it shouldn't + // be possible for the call to return and the interrupt swallowed. + // + test(mainThread.isInterrupted()); + // Clear the interrupt at this point. + Thread.interrupted(); } catch(Ice.OperationInterruptedException ex) { @@ -102,13 +131,15 @@ public class AllTests final CallbackBase cb = new CallbackBase(); mainThread.interrupt(); + final boolean responseCalled[] = new boolean[1]; + responseCalled[0] = false; p.begin_sleep(500, new Callback_TestIntf_sleep() { - @Override public void response() { - test(false); + responseCalled[1] = true; + cb.called(); } @Override @@ -124,7 +155,20 @@ public class AllTests test(false); } }); + boolean interrupted = false; + if(mainThread.isInterrupted()) + { + // + // The AMI request will receive a response. + // + Thread.interrupted(); + interrupted = true; + } cb.check(); + if(interrupted) + { + test(responseCalled[0]); + } ExecutorService executor = java.util.concurrent.Executors.newFixedThreadPool(1); executor.submit(new Runnable() { @@ -162,7 +206,7 @@ public class AllTests try { - Ice.AsyncResult r = p.begin_op(); + Ice.AsyncResult r = p.begin_sleep(250); Thread.currentThread().interrupt(); r.waitForCompleted(); test(false); @@ -174,15 +218,19 @@ public class AllTests try { - Ice.AsyncResult r = p.begin_op(); + Ice.AsyncResult r = p.begin_sleep(250); Thread.currentThread().interrupt(); - p.end_op(r); + p.end_sleep(r); test(false); } catch(Ice.OperationInterruptedException ex) { // Expected } + catch(test.Ice.interrupt.Test.InterruptedException e) + { + test(false); + } // // Test interrupt of waitForSent. Here hold the adapter and send a large payload. The diff --git a/js/src/Ice/PropertyNames.js b/js/src/Ice/PropertyNames.js index 745006d12b0..4e90e75776d 100644 --- a/js/src/Ice/PropertyNames.js +++ b/js/src/Ice/PropertyNames.js @@ -6,7 +6,7 @@ // ICE_LICENSE file included in this distribution. // // ********************************************************************** -// Generated by makeprops.py from file ../config/PropertyNames.xml, Wed Aug 13 09:11:52 2014 +// Generated by makeprops.py from file ./config/PropertyNames.xml, Wed Aug 13 15:11:58 2014 // IMPORTANT: Do not edit this file -- any edits made here will be lost! @@ -182,6 +182,7 @@ new Property("/^Ice\.Warn\.UnknownProperties/", false, null), new Property("/^Ice\.Warn\.UnusedProperties/", false, null), new Property("/^Ice\.CacheMessageBuffers/", false, null), + new Property("/^Ice\.BackgroundIO/", false, null), ]; /* jshint +W044*/ |