File tree Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Expand file tree Collapse file tree 2 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ PHP NEWS
33
33
. Fixed bug GH-11928 (The --enable-re2c-cgoto doesn't add the -g flag).
34
34
(Peter Kokot)
35
35
. Added the #[\Deprecated] attribute. (beberlei, timwolla)
36
+ . Fixed GH-11389 (Allow suspending fibers in destructors). (Arnaud, trowski)
36
37
37
38
- Curl:
38
39
. Deprecated the CURLOPT_BINARYTRANSFER constant. (divinity76)
Original file line number Diff line number Diff line change @@ -827,6 +827,19 @@ PHP 8.4 UPGRADE NOTES
827
827
environment variable to 0, or pass the --online flag to run-tests.php to
828
828
execute them.
829
829
830
+ * Fiber switching during destructor execution is now allowed. It was previously
831
+ blocked due to conflicts with garbage collection.
832
+
833
+ Destructors may now be executed in a separate Fiber:
834
+
835
+ When garbage collection is triggered in a Fiber, destructors called by the GC
836
+ are executed in a separate Fiber: the gc_destructor_fiber. If this Fiber
837
+ suspends, a new one is created to execute the remaining destructors. The
838
+ previous gc_destructor_fiber is not referenced anymore by the GC and may be
839
+ collected if it's not referenced anywhere else. Objects whose destructor is
840
+ suspended will not be collected until the destructor returns or the Fiber is
841
+ collected.
842
+
830
843
========================================
831
844
14. Performance Improvements
832
845
========================================
You can’t perform that action at this time.
0 commit comments