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
PHP 8.0 release #201
Comments
I've compiled it for windows |
It looks like it's already working for PHP8 but not released for PECL yet |
Yeah, I really just need it to be tagged at some point. I'm fine with building it from source, but my company doesn't like using unreleased software, for obvious reasons |
The fact is the future of parallel is in jeopardy because of fibers in core: The core has chosen a concurrency model and it doesn't accommodate threads. Fibers and parallel threads cannot interact with each other in a predictable way because of the way CSP is implemented in parallel. Some people think that's not a problem, but I disagree, I don't think you'll be able to make full use of either fibers or threads while the two cannot interact with each other. I've heard a few people say that they would like me to continue to maintain parallel, including the author of the Fiber RFC and some of its supporters. However, I wrote parallel for inclusion into PHP, and today it looks like that is never going to happen. I don't use parallel for anything personally, nor do I use it at work. I can't justify spending time on it. I have a few sponsors on github but nowhere near enough to change my mind that this project is probably a dead end. |
I guess that's okay, I don't think php ever wanted to go with threads, it's always been super hard to compile a php version that is threadsafe and then install libs like parallel to use (personally tried 5 times over the years and never succeeded once).. I guess it would have been a better choice for performance but in the end, we just want an easy way to write and use async functions which has never been directly available in php, maybe one day they'll make php threadsafe by default but I doubt it I'm just happy it's going somewhere and not having to wait another 10 years to see that happen Just a bit sad to see years of efforts and work thrown away Cheers |
Hi Joe, PHP not supporting multithreading is painful
I really don’t have a good feeling and this if this project reaching a deadend is very unpleasant. But these questions will always stay in my mind. Regards |
@krakjoe - reading the above sadens me. I really get that you don't use it personally, and that's probably OK. However, Fibers really is no substitute for this in any way. This project really helped us solve a major problem where we could get checks that previously took hours down to minutes. Consider calls that blocks, without any non-blocking alternatives, eg code involving dns_get_record() - our use case - where you simply pass a label, and a type, or calls to pretty much all things SQL based (from what I can tell). In fact, Fibers really only seems to solve cases that doesn't need solving (ie, has alternative solutions). So unless someone can show me how to take a sequence of say 10k DNS names, and have a concurrent resolver resolving say 10 of these names in parallel at a time using fibers ... Now our only alternative is going to another language, probably some C in this case where we can use getaddrinfo_a ... but then our interactions with SOAP becomes a nightmare again. I note there are availability of PHP8, in spite of PHP8.2 not working (or there's reports). Any chance we can get a tagged release at least for version 8.0/8.1 perhaps? Given the overall demand for this, I'm hopeful that others should be able to contribute fixes for newer PHP versions based on the framework you've already provided. |
#201 (comment) throws a wrench into my current side project... :( A couple years ago I wrote an app that used pthreads to multithread. It let me process some data fast enough my target server couldn't keep up. It was pretty awesome, and I was sad work decided to buy from a vendor instead... I was really hoping to do something similar in my current project. Question, does Fiber make it impossible to do real multithreading? |
Short answer: Yes. Fiber is similar to the way multi-threading would work under DOS. |
Ok. Thanks for the info. Thanks to @krakjoe for the work he did on both this and pthreads. Would have been awesome if it had made it into core. |
No, fibers are green threads. Multiple switching stacks in one process, still tied to one CPU core. See https://wiki.php.net/rfc/fibers#why_not_add_an_event_loop_and_asyncawait_api_to_core |
It's coming #250 |
Why are the new features of PHP v8.1 mentioned in the official documentation not compiled in the core of PHP v8.1, and how can I enable Fiber in PHP v8.1 on Debian 11? |
Firstly, I appreciate all the time and effort that has been put into this extension and thank you very much for it.
I'm very eager to see a release for PHP 8. Do you have any kind of ETA for this?
I don't need a fixed date, more like "it's close", "far away", "something in between", kinda thing.
The text was updated successfully, but these errors were encountered: