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
Working threads #4
Comments
That sounds like a good idea, even if I don't see exactly how can sending/receiving mtproto requests asynchronously improve speed or efficiency. |
Actually the non-blocking async i/o is to allow integration of your code with existing systems such as websocket servers / clients etc. |
Implementing threads atm, will take a while, but this will allow the creation of a fast socket wrapper. |
@danog Would you please explain more about threads atm? |
kek |
This will only work when the dev of pthreads fixes bugs with nested volatile objects, and the devs of php fix https://bugs.php.net/bug.php?id=74545 (workarounds slow down everything too much) |
https://github.com/SirSnyder/pthreads/tree/feature/nested_volatiles helps only partially |
The latest version now supports multiprocessing with pcntl_fork. |
@danog Nice |
Finally implemented async in the alpha branch |
async != threaded |
But async is what OP originally proposed to implement :) |
First, thank you for this awesome project ! I'll look forward to contribute very soon :-).
That said, I would like to suggest using a library such as ReactPHP, Icicle.io or equivalent in order to permit assynchronous, non-blocking I/O. I think that, since the project its still in the beginning, this change wouldn't impact too much. I can try to work this into the code if necessary.
The text was updated successfully, but these errors were encountered: