|
10 | 10 | package org.jruby.truffle.runtime.core; |
11 | 11 |
|
12 | 12 | import com.oracle.truffle.api.nodes.ControlFlowException; |
13 | | - |
14 | 13 | import com.oracle.truffle.api.nodes.Node; |
| 14 | + |
15 | 15 | import org.jruby.truffle.nodes.RubyNode; |
16 | 16 | import org.jruby.truffle.nodes.objects.Allocator; |
17 | 17 | import org.jruby.truffle.runtime.RubyContext; |
18 | 18 | import org.jruby.truffle.runtime.control.BreakException; |
19 | 19 | import org.jruby.truffle.runtime.control.RaiseException; |
20 | 20 | import org.jruby.truffle.runtime.control.ReturnException; |
| 21 | +import org.jruby.truffle.runtime.control.ThreadExitException; |
21 | 22 | import org.jruby.truffle.runtime.subsystems.FiberManager; |
22 | 23 | import org.jruby.truffle.runtime.subsystems.ThreadManager; |
23 | 24 | import org.jruby.truffle.runtime.subsystems.ThreadManager.BlockingActionWithoutGlobalLock; |
@@ -123,7 +124,7 @@ public void run() { |
123 | 124 | final Object[] args = finalFiber.waitForResume(); |
124 | 125 | final Object result = finalBlock.rootCall(args); |
125 | 126 | finalFiber.resume(finalFiber.lastResumedByFiber, true, result); |
126 | | - } catch (FiberExitException e) { |
| 127 | + } catch (FiberExitException | ThreadExitException e) { // TODO (eregon, 21 Apr. 2015): The thread should cleanly kill its fibers when dying. |
127 | 128 | // Naturally exit the thread on catching this |
128 | 129 | } catch (ReturnException e) { |
129 | 130 | sendMessageTo(finalFiber.lastResumedByFiber, new FiberExceptionMessage(finalFiber.getContext().getCoreLibrary().unexpectedReturn(null))); |
|
0 commit comments