多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
* 在多进程的模式下共享一些数据需要用到swoole的table.`Table`内置行锁自旋锁所以是线程/进程安全的. <details> <summary>config/swoole.php</summary> ~~~ 'tables' => [ 'u2fd' => [ 'size' => 10240, 'columns' => [ ['name' => 'fd', 'type' => 1, 'size' => 8] ] ], 'fd2u' => [ 'size' => 10240, 'columns' => [ ['name' => 'uid', 'type' => 1, 'size' => 8] ] ], ], ~~~ </details> 这里配置了一个fd与uid的相互映射关系.后续用到. 关于字段的说明参见swoole手册[https://wiki.swoole.com/#/memory/table](https://wiki.swoole.com/#/memory/table)