Skip to content

Commit

Permalink
更新-w auto在单核设备上的行为
Browse files Browse the repository at this point in the history
  • Loading branch information
CandyMi authored Jun 1, 2022
1 parent 8c6505a commit 96439f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/core_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ static inline void cfadmin_specify_nprocess(const char* w) {
nprocess = 1;
/* 自动检查可用核心数量 */
if (!strcmp(w, "auto"))
nprocess = sysconf(_SC_NPROCESSORS_ONLN) < 1 ? 1 : sysconf(_SC_NPROCESSORS_ONLN);
nprocess = sysconf(_SC_NPROCESSORS_ONLN) < 2 ? 2 : sysconf(_SC_NPROCESSORS_ONLN);
}

/* 后台运行 */
Expand Down Expand Up @@ -290,8 +290,8 @@ int main(int argc, char const *argv[]) {
cfadmin_init_args(argc, argv);

#if defined(__MSYS__) || defined(__CYGWIN__)
/* Windows下不可使用多进程 */
nprocess = 1;
/* Windows下不可使用多进程 */
nprocess = 1;
#else
int n = -1;
if (getenv("cfadmin_nprocess"))
Expand Down

0 comments on commit 96439f1

Please sign in to comment.