This commit is contained in:
2021-02-25 13:35:48 +08:00
parent d4ba31706c
commit 15ed8e9f5c
5 changed files with 237 additions and 188 deletions
+4 -4
View File
@@ -65,7 +65,7 @@ class Connection extends Pool
if (!Context::hasContext('begin_' . $coroutineName)) {
Context::setContext('begin_' . $coroutineName, 0);
}
Context::autoIncr('begin_' . $coroutineName);
Context::increment('begin_' . $coroutineName);
if (!Context::getContext('begin_' . $coroutineName) !== 0) {
return;
}
@@ -84,7 +84,7 @@ class Connection extends Pool
if (!Context::hasContext('begin_' . $coroutineName)) {
return;
}
if (Context::autoDecr('begin_' . $coroutineName) > 0) {
if (Context::decrement('begin_' . $coroutineName) > 0) {
return;
}
$connection = Context::getContext($coroutineName);
@@ -117,7 +117,7 @@ class Connection extends Pool
if (!Context::hasContext('begin_' . $coroutineName)) {
return;
}
if (Context::autoDecr('begin_' . $coroutineName) > 0) {
if (Context::decrement('begin_' . $coroutineName) > 0) {
return;
}
if (($connection = Context::getContext($coroutineName)) instanceof PDO) {
@@ -250,7 +250,7 @@ class Connection extends Pool
*/
public function remove($coroutineName)
{
Context::deleteContext($coroutineName);
Context::remove($coroutineName);
}
/**