Comments (2)
bootstrap 配置为 server.php ,否则将不会执行任何代码,线程直接退出,又重启
from swoole-src.
你对 bootstrap 的理解错了,主线程没有办法传递事件回调函数给子线程。所以 bootstrap
它应该是包含 new Server
代码的,也就是子线程依然需要再次执行一遍:
new Server
Server::on()
Server::start()
否则工作线程无法设置事件回调函数。
from swoole-src.
Related Issues (20)
- undefined method Swoole\Thread::exec() HOT 4
- websocket服务器为什么在onclose事件中不提供closeCode HOT 2
- php8.3 swoole5.1.3 TaskWorker_onPipeReceive(): read(1056, 8192) failed,ReactorEpoll::wait(): EPOLLIN handle failed HOT 1
- There is a memory leak defect on line 326 of the file /swoole-src/src/wrapper/http.cc.
- Calling $webSocketServer->task() is giving PHP Fatal error:Uncaught ArgumentCountError: Too few arguments to function [my_class_name]::{closure}(), 2 passed and exactly 4 expected HOT 1
- Second argument "Swoole\Server\Task $task" of the callback function of the event "onTask" becomes "nul"l when passed to a class constructor / function HOT 1
- 大并发的情况下,部分Worker,CPU一直占满100%,进程死循环 HOT 2
- macOS arm64 build failed with php 8.3.x HOT 1
- Http2 Server/Response does not support streaming (gRPC Server Streaming RPC / Bidirectional Streaming RPC)
- swoole6 设置dispatch_mode平均分配工作线程无效 HOT 3
- 多线程模式server达到max_request后进程终止;kill -USR1无法重启子线程 HOT 2
- php8.1.x+swoole-5.1.x+alpine3.1.7+xdebug 3.3.2 ,启动 hyperf 项目报错 HOT 1
- Worker freezes after restart when using worker_max_concurrency HOT 2
- Can not change settings for other opened port HOT 2
- Incorrect stats behavior when restarting workers
- v6多线程下 Swoole\Http\Response::create无效 HOT 1
- Async programming does not work in the magic __get() method HOT 2
- V6 chown函数异常 HOT 8
- Request header encoding error with exactly 16 lenght HOT 3
- Server-reload() does not terminate Swoole Timers, gracefully HOT 5
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-src.