Skip to content

refactor: removes context on the C side #1404

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

Merged

Conversation

AlliBalliBaba
Copy link
Contributor

@AlliBalliBaba AlliBalliBaba commented Feb 22, 2025

Most of this PR is a refactor of the FrankenPHPContext. I noticed that having a context on both the C and the go side can be pretty confusing and error prone. Especially considering that fatal errors (like timeouts) will make a worker just jump to the end of a script. This PR removes most of the context on the C side and decouples some components from net/http by passing the context in channels.
Having minimal thread-local context on the C side should also make it easier to execute PHP directly in go threads in the future.

@AlliBalliBaba AlliBalliBaba changed the title Feat: adds busy timeouts refactor: removes contet on the C side Feb 23, 2025
@AlliBalliBaba AlliBalliBaba changed the title refactor: removes contet on the C side refactor: removes context on the C side Feb 23, 2025
@AlliBalliBaba AlliBalliBaba marked this pull request as ready for review February 23, 2025 23:35
@Reinhard-Berger
Copy link

Will this impact Performance?

@AlliBalliBaba
Copy link
Contributor Author

@Reinhard-Berger this will not affect performance

@AlliBalliBaba
Copy link
Contributor Author

@dunglas let me know once you're ready to merge this, I have some small follow-ups that this PR enables.

@AlliBalliBaba
Copy link
Contributor Author

We can also wait for #1376, pretty sure there will be some small conflicts.

@withinboredom
Copy link
Member

I have some small follow-ups that this PR enables.

Yes. Slow down on the major refactors :p

I have a few too, but just been waiting on things to stabilize. Seriously good work though!

@dunglas dunglas merged commit f50248a into main Mar 10, 2025
55 checks passed
@dunglas dunglas deleted the feat/auto-scale-clock-time-fc-better-timeouts-refactor-context branch March 10, 2025 07:44
@dunglas
Copy link
Member

dunglas commented Mar 10, 2025

Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants