改名
This commit is contained in:
@@ -45,7 +45,6 @@ abstract class Pool extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $name
|
* @param $name
|
||||||
* @return array
|
* @return array
|
||||||
@@ -68,7 +67,6 @@ abstract class Pool extends Component
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param $cds
|
* @param $cds
|
||||||
* @param false $isMaster
|
* @param false $isMaster
|
||||||
@@ -126,13 +124,13 @@ abstract class Pool extends Component
|
|||||||
*/
|
*/
|
||||||
public function createConnect(array $config, string $coroutineName, callable $createHandler): PDO|Redis|false
|
public function createConnect(array $config, string $coroutineName, callable $createHandler): PDO|Redis|false
|
||||||
{
|
{
|
||||||
if (Context::hasContext('create:connect:' . $coroutineName)) {
|
if ($client = Context::getContext($coroutineName)) {
|
||||||
while (($client = Context::getContext($coroutineName)) != null){
|
|
||||||
var_dump($client);
|
|
||||||
}
|
|
||||||
var_dump($client);
|
|
||||||
return $client;
|
return $client;
|
||||||
}
|
}
|
||||||
|
if (Context::hasContext('create:connect:' . $coroutineName)) {
|
||||||
|
Coroutine::sleep(0.001);
|
||||||
|
return $this->createConnect($config, $coroutineName, $createHandler);
|
||||||
|
}
|
||||||
Context::setContext('create:connect:' . $coroutineName, 1);
|
Context::setContext('create:connect:' . $coroutineName, 1);
|
||||||
|
|
||||||
$client = call_user_func($createHandler, ...$config);
|
$client = call_user_func($createHandler, ...$config);
|
||||||
|
|||||||
Reference in New Issue
Block a user