| 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); |