* 在多進程的模式下共享一些數據需要用到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)