Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(36)

Unified Diff: src/org/python/core/FunctionThread.java

Issue 2810: SystemRestart exception to restart the interpreter (Closed) SVN Base: https://jython.svn.sourceforge.net/svnroot/jython/branches/asm
Patch Set: Created 1 year, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side by-side-diff with in-line comments
Download patch
Index: src/org/python/core/FunctionThread.java
===================================================================
--- src/org/python/core/FunctionThread.java (revisión: 5073)
+++ src/org/python/core/FunctionThread.java (copia de trabajo)
@@ -6,26 +6,20 @@
private final PyObject[] args;
private final PySystemState systemState;
- public FunctionThread(PyObject func, PyObject[] args) {
- super();
+ public FunctionThread(PyObject func, PyObject[] args, long stack_size, ThreadGroup group) {
+ super(group, null, "Thread", stack_size);
this.func = func;
this.args = args;
this.systemState = Py.getSystemState();
}
- public FunctionThread(PyObject func, PyObject[] args, long stack_size) {
- super(null, null, "Thread", stack_size);
- this.func = func;
- this.args = args;
- this.systemState = Py.getSystemState();
- }
-
public void run() {
Py.setSystemState(systemState);
try {
func.__call__(args);
} catch (PyException exc) {
- if (Py.matchException(exc, Py.SystemExit)) {
+ if (Py.matchException(exc, Py.SystemExit) ||
+ Py.matchException(exc, Py.SystemRestart)) {
return;
}
Py.stderr.println("Unhandled exception in thread started by " + func);

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld r497