Repository navigation
Add API to cancel async jobs - #14602
Merged
Merged
Conversation
sfan5
reviewed
Jun 3, 2024
Contributor
Author
|
I almost forgot: should this feature also be available for the main menu environment? |
Member
No need atm. If someone needs it in the future, they can add it. |
sfan5
reviewed
Jun 3, 2024
sfan5
reviewed
Jun 3, 2024
sfan5
reviewed
Jun 4, 2024
sfan5
reviewed
Jun 4, 2024
sfan5
self-requested a review
June 22, 2024 12:30
sfan5
approved these changes
Aug 18, 2024
sfan5
reviewed
Aug 18, 2024
Member
|
@appgurueu maybe you could review this? |
appgurueu
reviewed
Nov 21, 2024
appgurueu
reviewed
Nov 21, 2024
y5nw
force-pushed
the
async-canceling
branch
2 times, most recently
from
November 22, 2024 14:45
8c9b422 to
3aea108
Compare
sfan5
reviewed
Nov 22, 2024
sfan5
self-requested a review
December 10, 2024 20:21
sfan5
reviewed
Jan 28, 2025
sfan5
approved these changes
Feb 18, 2025
Member
|
apparently this should be "Action/change needed": https://irc.luanti.org/luanti-dev/2025-02-18#i_6243730 |
Contributor
Author
|
I called off merging back then because I realized that the second run of the unittests doesn't actually complete, but it seems unrelated to this issue. Aside from that the unittests here still pass, so this PR should be ready to be merged unless I overlooked something else. |
Member
|
Ping |
Co-authored-by: sfan5 <sfan5@live.de>
Co-authored-by: sfan5 <sfan5@live.de>
mjz19910
pushed a commit
to mjz19910/luanti
that referenced
this pull request
Aug 29, 2025
* Implement API to cancel async jobs Co-authored-by: sfan5 <sfan5@live.de> * update AsyncJob:cancel documentation from review * Use IPC to unblock async * review * review async unblocking * review * Apply suggestions from code review Co-authored-by: sfan5 <sfan5@live.de> * minor licensing --------- Co-authored-by: y5nw <y5nw@protonmail.com> Co-authored-by: sfan5 <sfan5@live.de>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds an API to cancel async jobs.
See above
The async engine attempts to remove jobs from the queue if it is not yet executed.
Partially addresses No proper way to deal with async job interdependencies / no cancellation #13681
See linked issue.
See linked issue.
To do
This PR is a Work in Progress.
Implement replacing jobs(Dropped)Replacing jobs before the job is run(Dropped)Replacing jobs after the job is complete(Dropped)How to test
The new API should be covered by unittests.
Note that I have not yet figured out how to test certain things mentioned in the PR, such as canceling existing async jobs on shutdown.