Changeset 31692 for main/trunk/gli/src/org/greenstone/gatherer/shell
- Timestamp:
- 2017-05-18T20:38:56+12:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/shell/GShell.java
r31670 r31692 63 63 64 64 /** The <strong>GShell</strong> is reponsible for running a separately threaded process in the command shell. This is necessary for executing the Perl Scripts and also for other system related funcitonality. 65 * When modifying this class, bear in mind concurrency issues that could arise with SafeProcess' 66 * worker threads and where synchronization may be needed to prevent such issues. 65 67 */ 66 68 public class GShell … … 390 392 SafeProcess.log("********** HAS SIGNALLED STOP. INTERRUPTING THE GSHELL/SAFEPROCESS THREAD"); 391 393 392 this.interrupt(); // interrupt this thread which is running the SafeProcess prcs 393 // this will propagate the CANCEL status to any worker threads launched by the SafeProcess 394 // The following is implemented to interrupt the SafeProcess thread (which is *this* GShell thread), 395 // but only if any process is being run by SafeProcess. 396 // This will propagate the CANCEL status to any worker threads launched by the SafeProcess. 397 // Everything will clean up nicely after itself (even terminating subprocesses that prcs launched on Windows!) 398 prcs.cancelRunningProcess(); 399 394 400 prcs = null; 395 401 }
Note:
See TracChangeset
for help on using the changeset viewer.