add context() fetch data mode

enable coroutine override
This commit is contained in:
whale
2020-04-14 23:46:42 +08:00
parent c1f720a0b3
commit b560246efb
8 changed files with 43 additions and 15 deletions

View File

@@ -94,6 +94,7 @@ class WorkerStartEvent implements SwooleEvent
$class = new $class_name(["server" => $this->server, "worker_id" => $this->worker_id], ModHandleType::SWOOLE_WORKER_START);
call_user_func_array([$class, $v->method], []);
}
set_coroutine_params(["server" => $this->server, "worker_id" => $this->worker_id]);
foreach (ZMBuf::$events[SwooleEventAfter::class] ?? [] as $v) {
/** @var AnnotationBase $v */
if (strtolower($v->type) == "workerstart") {
@@ -156,4 +157,4 @@ class WorkerStartEvent implements SwooleEvent
DataProvider::saveBuffer();
});
}
}
}