mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-09 01:35:35 +08:00
tmp connect
This commit is contained in:
@@ -18,6 +18,7 @@ class LightCacheInside
|
||||
self::createTable("wait_api", 3, 65536);
|
||||
self::createTable("connect", 3, 64); //用于存单机器人模式下的机器人fd的
|
||||
self::createTable("static_route", 64, 256);//用于存储
|
||||
self::createTable("light_array", 8, 512, 0.6);
|
||||
} catch (ZMException $e) {
|
||||
return false;
|
||||
} //用于存协程等待的状态内容的
|
||||
@@ -59,10 +60,11 @@ class LightCacheInside
|
||||
* @param $name
|
||||
* @param $size
|
||||
* @param $str_size
|
||||
* @param int $conflict_proportion
|
||||
* @throws ZMException
|
||||
*/
|
||||
private static function createTable($name, $size, $str_size) {
|
||||
self::$kv_table[$name] = new Table($size, 0);
|
||||
private static function createTable($name, $size, $str_size, $conflict_proportion = 0) {
|
||||
self::$kv_table[$name] = new Table($size, $conflict_proportion);
|
||||
self::$kv_table[$name]->column("value", Table::TYPE_STRING, $str_size);
|
||||
$r = self::$kv_table[$name]->create();
|
||||
if ($r === false) throw new ZMException("内存不足,创建静态表失败!");
|
||||
|
||||
Reference in New Issue
Block a user