Skip to content

Fix busy-waiting in waitForTaskToFinish - bump to 9.1.2#21

Merged
franklupo merged 1 commit intomasterfrom
fix/wait-task-thread-sleep
Feb 20, 2026
Merged

Fix busy-waiting in waitForTaskToFinish - bump to 9.1.2#21
franklupo merged 1 commit intomasterfrom
fix/wait-task-thread-sleep

Conversation

@franklupo
Copy link
Copy Markdown
Member

Summary

  • Replace CPU-intensive busy-wait loop with Thread.sleep(wait) in waitForTaskToFinish
  • Properly handle InterruptedException by restoring thread interrupt flag
  • Remove redundant waitTime variable
  • Bump version to 9.1.2

Test plan

  • Verify waitForTaskToFinish waits the correct amount of time between checks
  • Verify thread interrupt is handled correctly
  • Confirm CPU usage is reduced during task polling

Replace CPU-intensive busy-wait loop with Thread.sleep() to reduce CPU usage
and properly handle thread interruption.
@franklupo franklupo merged commit 28b80ce into master Feb 20, 2026
4 checks passed
@franklupo franklupo deleted the fix/wait-task-thread-sleep branch February 20, 2026 17:40
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.

1 participant