Skip to content

fibers: refactor fiber to only rely on a FCC - #23994

Open
Girgias wants to merge 2 commits into
php:masterfrom
Girgias:fibers-use-only-fcc
Open

Girgias wants to merge 2 commits into
php:masterfrom
Girgias:fibers-use-only-fcc

Conversation

@Girgias

@Girgias Girgias commented Sep 29, 2026

Copy link
Copy Markdown
Member

This reduces the size of the zend_fiber struct from 328 bytes to 280 while also simplifying memory management for callables, as this is all handled by the FCC API.

I wonder if we should try to move the zend_fiber_status field from _zend_fiber_context to _zend_fiber because if we use a C23 enum it would fit in the gap between the flags and param_count fields.

@Girgias

Girgias commented Nov 5, 2026

Copy link
Copy Markdown
Member Author

@arnaud-lb could you have a look as to why Zend/tests/fibers/destructors_015.phpt fails and doesn't catch the exception? The other test expectation change seems very much correct as it only gets called when the fiber is actually dtored.

Girgias and others added 2 commits November 16, 2026 15:36
This reduces the size of the zend_fiber struct from 328 bytes to 280 while also simplifying memory management for callables, as this is all handled by the FCC API.
Co-authored-by: Arnaud Le Blanc <arnaud.lb@gmail.com>
@Girgias
Girgias force-pushed the fibers-use-only-fcc branch from d590a77 to b3f2c3e Compare November 16, 2026 15:39
@Girgias
Girgias marked this pull request as ready for review November 16, 2026 16:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant