* Make usage of deprecated Thread.stop() dependent on setting of
requestTimeoutStop = true|false app property
This commit is contained in:
parent
5c1714d855
commit
676f4a06f0
1 changed files with 9 additions and 7 deletions
|
@ -386,6 +386,7 @@ public class RhinoEngine implements ScriptingEngine {
|
||||||
Thread t = thread;
|
Thread t = thread;
|
||||||
if (t != null && t.isAlive()) {
|
if (t != null && t.isAlive()) {
|
||||||
t.interrupt();
|
t.interrupt();
|
||||||
|
if ("true".equals(app.getProperty("requestTimeoutStop", "true"))) {
|
||||||
try {
|
try {
|
||||||
Thread.sleep(5000);
|
Thread.sleep(5000);
|
||||||
if (t.isAlive()) {
|
if (t.isAlive()) {
|
||||||
|
@ -397,6 +398,7 @@ public class RhinoEngine implements ScriptingEngine {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if an object has a function property (public method if it
|
* Check if an object has a function property (public method if it
|
||||||
|
|
Loading…
Add table
Reference in a new issue