You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optimize the parsing order of command line parameters and configuration files, first parse the configuration file, and then parse other command line parameters.
# First parse the configuration file xx.conf, then parse other command line parameters# The values of x and s in the command line will override the values in xx.conf for easy debugging
./xx -x -s="hello" -config=xx.conf
Added built-in bool flag daemon on Linux platform to support background running programs
# add -daemon in the command line parameters# or set in the configuration file: daemon = true
./xx -daemon
Command line parameters support multiple styles, -x=y can be written as -x y or x=y
Optimize the way to specify the configuration file when the program starts.
./xx config=xx.conf # Use flag config to display the specified
./xx xx.conf # The configuration file name ends with .conf or config # and is the first non-flag parameter, then config= can be omitted
./xx -x xx.conf # -x is the flag, xx.conf is the first non-flag parameter
When defining the flag, you can specify the level in the comment to control the order of the flag in the configuration file.
// Use #3 at the beginning of the comment to specify level 3// The supported level is 0-99, the default is 10// When using --mkconf to automatically generate a configuration file, the flags are sorted by level, file name, and number of lines of codeDEF_bool(b, false, "#3 xxx");
Fixed bugs caused by io events registered in epoll(kevent, iocp) that were not removed in time.
Fix the bug that the internal iterator is not updated correctly when Scheduler::add_timer() is called.
Improve the implementation of co::connect, co::accept, etc. to support ipv6.
Added co::max_sched_num() interface to get the maximum number of scheduling threads supported, which is currently the number of CPU cores in the system.
Added co::sched_id() interface to get current scheduling thread id.
Added coroutine_id() interface to get the id of current coroutine.
Refactored Scheduler, the internal logic structure is clearer, and the code is more readable.
Modify the parameters of the co::tcp_socket(), co::udp_socket() interface to address family, deprecating the earlier way of specifying ipv4 and ipv6 with 4 and 6.
Simplify, remove some unnecessary configuration items.
Optimize connection management, you can specify the timeout period of idle connections and the maximum number of idle connections through rpc_conn_idle_sec and rpc_max_idle_conn.
Modify the implementation of hash32(), the 32-bit system uses the 32-bit version of murmur 2, the 64-bit system directly takes the lower 32 bits of hash64.