Unify accept and network threads into io threads
This commit is contained in:
@@ -83,8 +83,7 @@ void ConfigParser::parse_server_config(const auto &toml_data,
|
||||
parse_field(srv, "port", config.port);
|
||||
parse_field(srv, "unix_socket_path", config.unix_socket_path);
|
||||
parse_field(srv, "max_request_size_bytes", config.max_request_size_bytes);
|
||||
parse_field(srv, "accept_threads", config.accept_threads);
|
||||
parse_field(srv, "network_threads", config.network_threads);
|
||||
parse_field(srv, "io_threads", config.io_threads);
|
||||
parse_field(srv, "event_batch_size", config.event_batch_size);
|
||||
parse_field(srv, "max_connections", config.max_connections);
|
||||
parse_field(srv, "read_buffer_size", config.read_buffer_size);
|
||||
@@ -149,18 +148,10 @@ bool ConfigParser::validate_config(const Config &config) {
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if (config.server.accept_threads < 1 || config.server.accept_threads > 100) {
|
||||
std::cerr << "Configuration error: server.accept_threads must be between 1 "
|
||||
"and 100, got "
|
||||
<< config.server.accept_threads << std::endl;
|
||||
valid = false;
|
||||
}
|
||||
|
||||
if (config.server.network_threads < 1 ||
|
||||
config.server.network_threads > 1000) {
|
||||
std::cerr << "Configuration error: server.network_threads must be between "
|
||||
"1 and 1000, got "
|
||||
<< config.server.network_threads << std::endl;
|
||||
if (config.server.io_threads < 1 || config.server.io_threads > 1000) {
|
||||
std::cerr << "Configuration error: server.io_threads must be between 1 "
|
||||
"and 1000, got "
|
||||
<< config.server.io_threads << std::endl;
|
||||
valid = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user