From b0fbe0dfd8da9ef09b5d3043f49f6bd11d9a2407 Mon Sep 17 00:00:00 2001 From: Rob Ede Date: Tue, 8 Feb 2022 06:58:26 +0000 Subject: [PATCH] fix workers doc --- actix-web/MIGRATION-4.0.md | 4 ++++ actix-web/src/server.rs | 2 +- scripts/unreleased | 13 +++++++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/actix-web/MIGRATION-4.0.md b/actix-web/MIGRATION-4.0.md index 65f638c2e..f6c2f9bc6 100644 --- a/actix-web/MIGRATION-4.0.md +++ b/actix-web/MIGRATION-4.0.md @@ -139,3 +139,7 @@ TODO ## HttpResponse no longer implements Future TODO + +## `#[actix_web::main]` and `#[tokio::main]` + +TODO diff --git a/actix-web/src/server.rs b/actix-web/src/server.rs index c9d9cc9bd..bdcfbf48a 100644 --- a/actix-web/src/server.rs +++ b/actix-web/src/server.rs @@ -128,7 +128,7 @@ where /// Set number of workers to start. /// - /// By default, server uses number of available logical CPU as thread count. + /// By default, the number of available physical CPUs is used as the worker count. pub fn workers(mut self, num: usize) -> Self { self.builder = self.builder.workers(num); self diff --git a/scripts/unreleased b/scripts/unreleased index 4dfa2d9ae..e664c0879 100755 --- a/scripts/unreleased +++ b/scripts/unreleased @@ -9,7 +9,16 @@ unreleased_for() { DIR=$1 CARGO_MANIFEST=$DIR/Cargo.toml - CHANGELOG_FILE=$DIR/CHANGES.md + + # determine changelog file name + if [ -f "$DIR/CHANGES.md" ]; then + CHANGELOG_FILE=$DIR/CHANGES.md + elif [ -f "$DIR/CHANGELOG.md" ]; then + CHANGELOG_FILE=$DIR/CHANGELOG.md + else + echo "No changelog file found" + exit 1 + fi # get current version PACKAGE_NAME="$(sed -nE 's/^name ?= ?"([^"]+)"$/\1/ p' "$CARGO_MANIFEST" | head -n 1)" @@ -36,6 +45,6 @@ unreleased_for() { cat "$CHANGE_CHUNK_FILE" } -for f in $(fd --absolute-path CHANGES.md); do +for f in $(fd --absolute-path 'CHANGE\w+.md'); do unreleased_for $(dirname $f) done