diff --git a/NEWS b/NEWS index 24be907121c..f0a1caa13c0 100644 --- a/NEWS +++ b/NEWS @@ -33,6 +33,7 @@ PHP NEWS . Fixed bug GH-11928 (The --enable-re2c-cgoto doesn't add the -g flag). (Peter Kokot) . Added the #[\Deprecated] attribute. (beberlei, timwolla) + . Fixed GH-11389 (Allow suspending fibers in destructors). (Arnaud, trowski) - Curl: . Deprecated the CURLOPT_BINARYTRANSFER constant. (divinity76) diff --git a/UPGRADING b/UPGRADING index e9421923320..d72ce15cf0a 100644 --- a/UPGRADING +++ b/UPGRADING @@ -827,6 +827,19 @@ PHP 8.4 UPGRADE NOTES environment variable to 0, or pass the --online flag to run-tests.php to execute them. +* Fiber switching during destructor execution is now allowed. It was previously + blocked due to conflicts with garbage collection. + + Destructors may now be executed in a separate Fiber: + + When garbage collection is triggered in a Fiber, destructors called by the GC + are executed in a separate Fiber: the gc_destructor_fiber. If this Fiber + suspends, a new one is created to execute the remaining destructors. The + previous gc_destructor_fiber is not referenced anymore by the GC and may be + collected if it's not referenced anywhere else. Objects whose destructor is + suspended will not be collected until the destructor returns or the Fiber is + collected. + ======================================== 14. Performance Improvements ========================================