Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix scheduler not respecting priority #51

Merged
merged 4 commits into from
Apr 15, 2024
Merged

Fix scheduler not respecting priority #51

merged 4 commits into from
Apr 15, 2024

Conversation

metrowaii
Copy link
Contributor

Proposed changes

With this new scheduler systems are assigned a priority internally. A system with no defined priority and no dependencies defaults to zero, and a system with dependencies should have a priority equal to the max priority of its dependencies + 1. We then sort the systems based on their internal priority.

Related issues

Closes #48

Copy link
Contributor

@benbrimeyer benbrimeyer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking a look into this. I have one consideration on making the developer-ux a bit more clear when I (inevitably) encounter this error again, but feel free to pass on it

lib/Loop.lua Outdated Show resolved Hide resolved
@Ukendio Ukendio added this to the v0.8.0 milestone Apr 13, 2024
Copy link
Member

@Ukendio Ukendio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@metrowaii metrowaii merged commit ff62f44 into main Apr 15, 2024
6 checks passed
@metrowaii metrowaii deleted the scheduler-fix-v2 branch April 15, 2024 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[0.7.1] default priority systems can be scheduled after systems with higher priority
3 participants