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

[scheduler] don't preempt task if worker queue is empty #976

Merged
merged 1 commit into from
Jan 6, 2025

Conversation

fwbrasil
Copy link
Collaborator

@fwbrasil fwbrasil commented Jan 6, 2025

There's no need to preempt the current task if the worker queue is empty and there isn't another task waiting for execution.

@@ -80,47 +80,6 @@ class SchedulerTest extends AnyFreeSpec with NonImplicitAssertions {
}
}

"cycle" - {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's not easy to test this at the scheduler level because, even if we submit more tasks, the concurrency regulator can introduce new workers. The behavior is covered in WorkerTest so I'm removing the tests here.

@fwbrasil fwbrasil force-pushed the worker-preempt-empty-queue branch from 565e533 to 0f29d26 Compare January 6, 2025 07:22
@fwbrasil fwbrasil merged commit 4dfe2ad into main Jan 6, 2025
3 checks passed
@fwbrasil fwbrasil deleted the worker-preempt-empty-queue branch January 6, 2025 14:54
fwbrasil added a commit that referenced this pull request Jan 9, 2025
There's no need to preempt the current task if the worker queue is empty
and there isn't another task waiting for execution.
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.

2 participants