mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
task: fix other task chains still running after exception occurs
A task returning DS_interrupt would only interrupt the current task chain, not the entire task manager. This meant that other tasks might get run with an exception state set, causing the exception state to get stomped on or the Python interpreter to complain. Fixes #692
This commit is contained in:
parent
9caae6520e
commit
224a32090f
@ -480,6 +480,12 @@ poll() {
|
||||
for (unsigned int i = 0; i < _task_chains.size(); ++i) {
|
||||
AsyncTaskChain *chain = _task_chains[i];
|
||||
chain->do_poll();
|
||||
|
||||
if (chain->_state == AsyncTaskChain::S_interrupted) {
|
||||
// If a task returned DS_interrupt, we need to interrupt the entire
|
||||
// manager, since an exception state may have been set.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Just in case the clock was ticked explicitly by one of our polling
|
||||
|
Loading…
x
Reference in New Issue
Block a user