We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c6505a commit 96439f1Copy full SHA for 96439f1
src/core_start.c
@@ -95,7 +95,7 @@ static inline void cfadmin_specify_nprocess(const char* w) {
95
nprocess = 1;
96
/* 自动检查可用核心数量 */
97
if (!strcmp(w, "auto"))
98
- nprocess = sysconf(_SC_NPROCESSORS_ONLN) < 1 ? 1 : sysconf(_SC_NPROCESSORS_ONLN);
+ nprocess = sysconf(_SC_NPROCESSORS_ONLN) < 2 ? 2 : sysconf(_SC_NPROCESSORS_ONLN);
99
}
100
101
/* 后台运行 */
@@ -290,8 +290,8 @@ int main(int argc, char const *argv[]) {
290
cfadmin_init_args(argc, argv);
291
292
#if defined(__MSYS__) || defined(__CYGWIN__)
293
- /* Windows下不可使用多进程 */
294
- nprocess = 1;
+ /* Windows下不可使用多进程 */
+ nprocess = 1;
295
#else
296
int n = -1;
297
if (getenv("cfadmin_nprocess"))
0 commit comments