co v2.0.2 released
New features
- Support mingw on windows.
xmake f -p mingw
xmake -v
- Support shared library on windows.
xmake f -k shared
xmake -v
- Support syslog header for co/log.
xmake b log
xmake r log -syslog -cout
- Add god mode. When you feel uneasy about writing a function of several hundred lines, you may call the following api to increase your confidence:
#include "co/god.h"
god::bless_no_bugs();
Changed
-
Add
co/cout.h
, makeCOUT
andCLOG
thread-safe. -
Add
co::thread_id()
, which may replacecurrent_thread_id() in the future
. -
co/log
: add time in name of old log files. -
co/log
: improve stack trace, use libbacktrace instead offork()+backtrace()
. -
Add
os::env(name, value)
for setting value of environment variables. -
Always use
/
as the path separator, and convert\
to/
in results ofos::cwd()
,os::homedir()
,os::exepath()
. -
Improve the path library, support windows path like
d:/xx
. -
Improve stability of coroutine hook.
-
tcp::Server::on_connection(tcp::Connection*)
totcp::Server::on_connection(tcp::Connection)
, no need to delete the connection object any more. -
Refactor
http::Client
, use curl easy handle only. -
Refactor
http::Server
, reduce memory copy to improve the performance.
Bugs fixed
-
Fix RemoveVectoredExceptionHandler bug.
-
Fix crash of http::Client in #168.
-
Fix bug in select hook in #176.
-
Fix a errno bug in co/flag, set errno to 0 before set_value.
-
Fix errno bug in
str::to_xxx()
. -
Fix hang-at-exit bug when using dll on windows.
-
Fix iterator bug in
std::multimap
on windows. -
Fix: failed to hook fcntl with a different _FILE_OFFSET_BITS.