MCPcopy Create free account
hub / github.com/GateNLP/gate-core / setExecutable

Method setExecutable

src/main/java/gate/Gate.java:733–747  ·  view source on GitHub ↗

Sets the Executable currently under execution. At a given time there can be only one executable set. After the executable has finished its execution this value should be set back to null. An attempt to set the executable while this value is not null will result in the method call waiting unt

(gate.Executable executable)

Source from the content-addressed store, hash-verified

731 * waiting until the old executable is set to null.
732 */
733 public synchronized static void setExecutable(gate.Executable executable) {
734 if(executable == null)
735 currentExecutable = executable;
736 else {
737 while(getExecutable() != null) {
738 try {
739 Thread.sleep(200);
740 }
741 catch(InterruptedException ie) {
742 throw new GateRuntimeException(ie.toString());
743 }
744 }
745 currentExecutable = executable;
746 }
747 } // setExecutable
748
749 /**
750 * Returns the curently set executable.

Callers 2

runMethod · 0.95
runMethod · 0.95

Calls 2

getExecutableMethod · 0.95
toStringMethod · 0.65

Tested by

no test coverage detected