fix: release running task after error so more tasks can run#7031
fix: release running task after error so more tasks can run#7031UberMouse wants to merge 2 commits intomaplibre:mainfrom
Conversation
f4334b9 to
b579f42
Compare
| if (task.cancelled) continue; | ||
| task.callback(timeStamp); | ||
| if (this._cleared) break; | ||
| try { |
There was a problem hiding this comment.
Shouldn't the task execution be wrapped in try catch and not the entire for loop?
There was a problem hiding this comment.
this ensures that exiting the function always releases the _currentlyRunning lock
There was a problem hiding this comment.
What will happen if I add two tasks - the first that throws and the second that should pass.
And then call the run method? Will the second task run or be "ignored"?
There was a problem hiding this comment.
Don't know. Don't have any idea how this Task system works, my boss just complained about this error so I found the linked issue and did a PR for the solution they suggested and never bothered to PR. Hopefully someone who knows anything about this Task system can check it out
There was a problem hiding this comment.
I would recommend trying to take a deeper look then, otherwise I'll have a hard time merging this as is...
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #7031 +/- ##
=======================================
Coverage 92.51% 92.51%
=======================================
Files 288 288
Lines 23925 23926 +1
Branches 5081 5081
=======================================
+ Hits 22134 22135 +1
Misses 1791 1791 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
Any updates on this? |
Launch Checklist
CHANGELOG.mdunder the## mainsection.Does the proposed fix described in #6093
When a task errors, set
this._currentlyRunningtofalseinstead of leaving it astrueto allow the next task to run instead of throwing an error.