Skip to content

safe_sleep: now it's safe and it does sleep (with fallback to the busy-wait)#4139

Closed
kosa12 wants to merge 1 commit intoactions:mainfrom
kosa12:main
Closed

safe_sleep: now it's safe and it does sleep (with fallback to the busy-wait)#4139
kosa12 wants to merge 1 commit intoactions:mainfrom
kosa12:main

Conversation

@kosa12
Copy link
Copy Markdown

@kosa12 kosa12 commented Nov 28, 2025

No description provided.

Copilot AI review requested due to automatic review settings November 28, 2025 16:24
@kosa12 kosa12 requested a review from a team as a code owner November 28, 2025 16:24
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR improves the safe_sleep.sh script by making it actually use the sleep command when available, with a fallback to the previous busy-wait implementation. This makes the script more efficient and resource-friendly by using proper sleep instead of spinning in a loop.

Key Changes

  • Adds detection for the sleep command availability using command -v
  • Uses native sleep when available for proper waiting behavior
  • Falls back to the original busy-wait loop when sleep is unavailable

@fingolfin
Copy link
Copy Markdown

Duplicate of PR #3143 (from February 2024 😅)

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