Skip to content

Fix EDF scheduler cancellation and state visibility - #6

Closed
yunuservices wants to merge 1 commit into
Tuinity:masterfrom
yunuservices:fix/scheduler-numa-cancel-state
Closed

yunuservices wants to merge 1 commit into
Tuinity:masterfrom
yunuservices:fix/scheduler-numa-cancel-state

Conversation

@yunuservices

@yunuservices yunuservices commented Feb 20, 2026 •

Copy link
Copy Markdown

This PR fixes a few correctness issues in the EDF scheduler.

  • Make SchedulableTick.state volatile, it was read without synchronization
  • Throw in EDFSchedulerThreadPool.schedule() when the start is not set, as documented in Scheduler#schedule
  • Apply the cancelled state in EDFSchedulerThreadPool.cancel() so a task cancelled while its tick is running is not rescheduled

Comment thread src/main/java/ca/spottedleaf/concurrentutil/scheduler/EDFSchedulerThreadPool.java Outdated
@yunuservices
yunuservices force-pushed the fix/scheduler-numa-cancel-state branch from e8972be to a951905 Compare June 2, 2026 13:11
@yunuservices
yunuservices force-pushed the fix/scheduler-numa-cancel-state branch from a951905 to 5348d20 Compare September 19, 2026 06:50
@yunuservices yunuservices changed the title Fix scheduler cancellation/state visibility and NUMA mapping Fix EDF scheduler cancellation and state visibility Sep 19, 2026
@yunuservices
yunuservices force-pushed the fix/scheduler-numa-cancel-state branch from 5348d20 to 0ca351a Compare October 20, 2026 09:17
@jpenilla

jpenilla commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

Thanks for the PR. These changes don't look correct but there appear to be some valid bugs here. Please open individual issues for each so they can be looked into.

@jpenilla jpenilla closed this Oct 20, 2026
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.

3 participants