You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#64: Refactor deadlock detection to use structured exceptions instead of warnings
- Add new Async\DeadlockError exception class extending Error
- Replace multiple async_warning() calls with single structured exception
- Implement proper exit_exception handling for inter-coroutine safety
- Update resolve_deadlocks() to set ZEND_ASYNC_EXIT_EXCEPTION correctly
- Add ZEND_ASYNC_EXCEPTION_DEADLOCK to async class enum (ID: 36)
- Extend async_get_class_ce() to support new exception type
- Update all deadlock tests to expect exception instead of warnings
- Fix memory leak by removing unnecessary GC_ADDREF calls
This change improves error handling by providing a single, catchable
DeadlockError exception instead of multiple warnings, while maintaining
proper coroutine cancellation behavior through exit_exception mechanism.
Tests updated:
- 001-deadlock-basic-test.phpt
- 002-deadlock-with-catch.phpt
- 003-deadlock-with-zombie.phpt
- 010-deadlock-after-cancel-with-zombie.phpt
0 commit comments