Skip to content

Commit

Permalink
fix threads num
Browse files Browse the repository at this point in the history
  • Loading branch information
hggq committed Oct 25, 2024
1 parent 6555d71 commit 738382f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion conf/server.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ static_pre=downloadfileauth|upload
method_pre= ;api/dev/hostcors
method_after=
isuse_php=0
rewrite_php=/Users/hzq/paozhu/www/default|index.php
rewrite_php=/Users/hzq/www/mpdftest|index.php
fastcgi_host=127.0.0.1 ;/run/php/php8.1-fpm.sock
fastcgi_port=9000
upload_max_size=16777216
Expand Down
4 changes: 4 additions & 0 deletions vendor/httpserver/src/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3893,6 +3893,10 @@ void httpserver::run(const std::string &sysconfpath)
_initwebsocketmethodregto(wsreg);

total_count = sysconfigpath.get_co_thread_num();
if(total_count < std::thread::hardware_concurrency())
{
total_count = std::thread::hardware_concurrency();
}
asio::io_context::work worker(io_context);
for (std::size_t i = 0; i < total_count; ++i)
{
Expand Down

0 comments on commit 738382f

Please sign in to comment.