Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow queueing of callbacks in destructors #99

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

danog
Copy link
Contributor

@danog danog commented Dec 6, 2024

Fixes #90.

Possibly the root cause of fiber deadlocks at work as well.

return;
}
if ($this->isEmpty()) {
while (\gc_collect_cycles());
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a while because I remember some php-src code/comment that said at least on some versions of PHP, a garbage collection run does not actually free all cycles at least in some conditions, deferring some loops until the next run: the while runs the GC multiple times, until no more work is done.

@danog danog marked this pull request as draft December 6, 2024 18:44
@danog danog marked this pull request as ready for review December 7, 2024 01:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Resumptions in final cycle collection after EventLoop return in DriverSuspension are ignored
1 participant