Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: 修正 QuickStart/config 动态配置说明 #197

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion Cn/HttpServer/contorller.md
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,6 @@ class Index extends Controller
var_dump($rq . $requestFlag);
});
\co::sleep(4);
// 【这里的数据会错乱】
var_dump($rq . $requestFlag);
});
$this->response()->write('this is index!' . $this->request()->getRequestParam('times'));
Expand Down
2 changes: 1 addition & 1 deletion Cn/QuickStart/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ return [
由于 `swoole` 是多进程的,如果使用 `SplArray` 方式存储,在单个进程修改配置后,其他进程将不会生效,使用`swoole_table` 方式的则会全部生效,需要特别注意。

::: tip
在 `EasySwoole 3.4.x` 之前版本,框架采用 `swoole_table` 作为默认配置驱动存储。所以当你在控制器( `worker` 进程)中修改某一项配置时,由于进程隔离,修改的配置不会在其他进程生效,所以我们可以使用动态配置: 动态配置将配置数据存储在 `swoole_table` 中,获取/修改配置数据时是从 `swoole_table` 直接操作,所有进程都可以使用。但是在目前最新版本中默认配置驱动存储变成了 `SplArray`,在单个进程修改配置后,其他进程将不会生效,需要特别注意。
在 `EasySwoole 3.4.x` 之前版本,框架采用 `swoole_table` 作为默认配置驱动存储。所以当你在控制器( `worker` 进程)中修改某一项配置时,是从 `swoole_table` 直接操作,所有进程都可以使用。但是在目前最新版本中默认配置驱动存储变成了 `SplArray`,在单个进程修改配置后,由于进程隔离原因,其他进程将不会生效,需要特别注意。
:::

## 其他
Expand Down