stanley-king 3 лет назад
Родитель
Сommit
493225de33
1 измененных файлов с 3 добавлено и 2 удалено
  1. 3 2
      helper/queue/iqueue.php

+ 3 - 2
helper/queue/iqueue.php

@@ -366,11 +366,12 @@ abstract class ILooper
                         }
                         else
                         {
-                            go(function () use ($content, $num, $mem) {
+                            $pThis = $this;
+                            go(function () use ($content, $num, $mem,$pThis) {
                                 $start = microtime(true);
                                 Log::record("BeginGoFunction coroutin_num={$num} memory={$mem}", Log::DEBUG);
 
-                                $method = $this->handle($content);
+                                $method = $pThis->handle($content);
 
                                 $use_time = microtime(true) - $start;
                                 $msg = sprintf("EndGoFunction coroutin_num={$num} memory={$mem} request_time=%.6f method={$method}", $use_time);