Skip to content

Conversation

@EdmondDantes
Copy link
Contributor

Added customizable scheduler heartbeat handler mechanism with zend_async_set_heartbeat_handler() API

@EdmondDantes EdmondDantes requested a review from Copilot December 17, 2025 08:37
@EdmondDantes EdmondDantes linked an issue Dec 17, 2025 that may be closed by this pull request
@EdmondDantes EdmondDantes self-assigned this Dec 17, 2025
Copy link

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 aims to add a customizable scheduler heartbeat handler mechanism to the TrueAsync extension, allowing developers to register custom callbacks that execute during scheduler operations. However, the implementation is incomplete and contains several critical issues that prevent compilation.

  • The heartbeat handler mechanism is partially implemented in the scheduler but lacks essential infrastructure components
  • Test file changes appear unrelated to the heartbeat handler feature
  • The documented API function is not implemented

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.

File Description
scheduler.c Introduces heartbeat handler invocation points in fiber_entry and scheduler_next_tick, relocating ZEND_ASYNC_SCHEDULER_HEARTBEAT macro usage, but references undefined types and globals
CHANGELOG.md Documents the new heartbeat handler feature with the zend_async_set_heartbeat_handler() API
tests/curl/005-error_handling.phpt Updates await_all usage to capture both results and exceptions via array destructuring, and adjusts expected test output order - changes appear unrelated to heartbeat handler feature

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@EdmondDantes EdmondDantes merged commit d16d6b9 into main Dec 17, 2025
7 checks passed
@EdmondDantes EdmondDantes deleted the 76-zend_async_scheduler_heartbeat branch December 17, 2025 08:49
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.

ZEND_ASYNC_SCHEDULER_HEARTBEAT

2 participants