-
Notifications
You must be signed in to change notification settings - Fork 365
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
refactor: removes context on the C side #1404
Conversation
Will this impact Performance? |
@Reinhard-Berger this will not affect performance |
…s-refactor-context # Conflicts: # frankenphp.c # phpthread.go # threadworker.go
@dunglas let me know once you're ready to merge this, I have some small follow-ups that this PR enables. |
We can also wait for #1376, pretty sure there will be some small conflicts. |
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! |
Great! |
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 fromnet/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.