diff options
author | Mark Spruiell <mes@zeroc.com> | 2014-08-15 16:23:00 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2014-08-15 16:23:00 -0700 |
commit | 01f1626babbe190f2d317b56a2a69eb164a00710 (patch) | |
tree | 02ab5fa55dc9f30984a618a76db64b053f8ce88a /java/demo/Ice/interrupt | |
parent | ICE-5592 - IceSSL.FindCert (SChannel Windows C++ impl) (diff) | |
download | ice-01f1626babbe190f2d317b56a2a69eb164a00710.tar.bz2 ice-01f1626babbe190f2d317b56a2a69eb164a00710.tar.xz ice-01f1626babbe190f2d317b56a2a69eb164a00710.zip |
minor Java edits
Diffstat (limited to 'java/demo/Ice/interrupt')
-rw-r--r-- | java/demo/Ice/interrupt/README | 43 | ||||
-rwxr-xr-x[-rw-r--r--] | java/demo/Ice/interrupt/expect.py | 0 |
2 files changed, 22 insertions, 21 deletions
diff --git a/java/demo/Ice/interrupt/README b/java/demo/Ice/interrupt/README index a28ae716ef2..1e9c183090f 100644 --- a/java/demo/Ice/interrupt/README +++ b/java/demo/Ice/interrupt/README @@ -1,6 +1,6 @@ -This demo illustrates how to interrupt blocking servant dispatches on the server -and interrupt blocking proxy invocations on the client by using -java.lang.Thread.interrupt. +This demo illustrates how to interrupt blocking servant dispatches on +the server and interrupt blocking proxy invocations on the client by +using Thread.interrupt(). To run the demo, first start the server: @@ -10,27 +10,28 @@ In a separate window, start the client: $ java Client -Calling TaskManager::run on the server simulates a long running task by sleeping -10 seconds. Ordinarily a server will not shutdown until all executing dispatched -requests are complete. By interrupting dispatch threads using -java.lang.Thread.interrupt a server shutdown will proceed, as long as the -servant implementation correctly handles the interrupt. +Calling TaskManager::run on the server simulates a long running task +by sleeping 10 seconds. Ordinarily a server will not shutdown until +all executing dispatched requests are complete. By interrupting +dispatch threads using Thread.interrupt() a server shutdown will +proceed, as long as the servant implementation correctly handles the +interrupt. -The simplest way to interrupt method dispatch threads is through the use of an -Ice.Dispatcher and ExecutorService. Calling shutdownNow on the ExecutorService -interrupts any executing tasks. +The simplest way to interrupt dispatch threads is by using an +Ice.Dispatcher and ExecutorService. Calling shutdownNow on the +ExecutorService interrupts any executing tasks. -Pressing ^C in the server calls shutdownNow on the executor service, as does -pressing 's' in the Client which calls TaskManager::shutdown, the implementation -of which itself calls shutdownNow. +Pressing ^C in the server calls shutdownNow on the executor service, +as does pressing 's' in the client which calls TaskManager::shutdown, +the implementation of which itself calls shutdownNow. -It is also possible to interrupt blocking invocations on an Ice proxy through -the use of java.lang.Thread.interrupt. +It is also possible to interrupt blocking invocations on an Ice proxy +by calling Thread.interrupt(). -In this demo, to interrupt a blocking proxy invocation on the client press 'b' -to run the invocation, and 'i' to interrupt the invocation. Only a single -blocking can be active at once. +In this demo, to interrupt a blocking proxy invocation on the client +press 'b' to run the invocation and 'i' to interrupt the invocation. +Only a single blocking invocation can be active at once. -Pressing 't' in the client runs the task on the server using a non-blocking AMI -invocation. +Pressing 't' in the client runs the task on the server using a +non-blocking AMI invocation. diff --git a/java/demo/Ice/interrupt/expect.py b/java/demo/Ice/interrupt/expect.py index 65797c9a5ba..65797c9a5ba 100644..100755 --- a/java/demo/Ice/interrupt/expect.py +++ b/java/demo/Ice/interrupt/expect.py |