Comments (7)
Best way is to require https://github.com/hyperf/coordinator lib into composer, otherwise i would take almost all classes... @Rastusik are u OK with that, or should (copy-paste) required parts ?!
from swoole-bundle.
@pistej thank yo ufor your contribution! could you post any information about the problem? Why do you think that hyperf/coordinator is the best way to solve it? Isn't that a bug in swoole?
from swoole-bundle.
@Rastusik I'm, not sure about bug in swoole, I found info about this in official swoole (and openswoole documentation):
Before the server
Start
event, the Server has finished the following:Created the Manager process
Created the Worker-Sub processes
Listening on the TCP/UDP port that was specified, no connections are accepted until this event returns
Started the OpenSwoole Timer process
After the Start event executes, the reactor threads are ready to process server events and accept connections from clients.
also:
OnWorkerStart and onStart callbacks are executed in parallel in different processes, with no order of precedence.
Hyperf fw solves that: https://github.com/hyperf/hyperf/blob/master/src/http-server/src/Server.php#L86
Coordinator lib just has functions which I would take to implement/fix this flow.
from swoole-bundle.
@Rastusik your opinion? would like to fix it some how :) thx.
from swoole-bundle.
@pistej sorry I didn't have a lot of time lately. Feel free to start a proof of concept if you wish and we will see. I'm kind of skeptical with the yeld
approach here https://github.com/hyperf/hyperf/blob/master/src/http-server/src/Server.php#L87 ... but looks like it's not a real yield, so I may be wrong :)
from swoole-bundle.
@Rastusik It's not yeld, just naming... created POC PR
from swoole-bundle.
@pistej released
from swoole-bundle.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swoole-bundle.