EasySwoole has a basic package for Swoole table for shared memory
This method is used to get the TableManager manager instance.
add($name,array $columns,$size = 1024)
This method is used to create a table
This method is used to get the table that has been created.
TableManager::getInstance()->add( self::TABLE_NAME, [ 'currentNum'=>['type'=>Table::TYPE_INT,'size'=>2], ], 1024 );
Note: Do not create a swoole table in callback locations such as onRequest, OnReceive, etc. The swoole table should be created before the service is started, for example in the mainServerCreate event.