企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
* 在多进程的模式下共享一些数据需要用到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)