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

macOS/iOS: Implement wake-ups using system mechanisms #4146

Merged
merged 2 commits into from
Mar 1, 2025

Conversation

madsmtm
Copy link
Member

@madsmtm madsmtm commented Feb 26, 2025

Setting an atomic in wake_up and relying on it being propagated by the time the run loop wakes up is brittle, the proper way of using CFRunLoopSource is to do your work inside the perform callback. This also automatically handles coalescing multiple events, and frees us from having to manually check an atomic on each iteration of the run loop.

Part of #1029.

@madsmtm madsmtm added S - enhancement Wouldn't this be the coolest? DS - macos DS - ios labels Feb 26, 2025
@madsmtm madsmtm changed the title macOS/iOS: Implement wake-ups using CF mechanisms macOS/iOS: Implement wake-ups using system mechanisms Feb 26, 2025
@madsmtm madsmtm force-pushed the madsmtm/apple-proper-wakeup branch 2 times, most recently from 5732d82 to 3217bc1 Compare February 27, 2025 00:52
@madsmtm madsmtm force-pushed the madsmtm/apple-proper-wakeup branch from 3217bc1 to fde5fb5 Compare March 1, 2025 11:54
@madsmtm madsmtm requested a review from kchibisov March 1, 2025 11:55
@kchibisov

This comment was marked as off-topic.

@madsmtm
Copy link
Member Author

madsmtm commented Mar 1, 2025

Moved your comment to #4149.

@madsmtm madsmtm merged commit 39c0862 into master Mar 1, 2025
57 checks passed
@madsmtm madsmtm deleted the madsmtm/apple-proper-wakeup branch March 1, 2025 19:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DS - ios DS - macos S - enhancement Wouldn't this be the coolest?
Development

Successfully merging this pull request may close these issues.

2 participants