Skip to content

co v2.0.2 released

Compare
Choose a tag to compare
@idealvin idealvin released this 03 Oct 09:47
· 574 commits to master since this release

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, make COUT and CLOG thread-safe.

  • Add co::thread_id(), which may replace current_thread_id() in the future.

  • co/log: add time in name of old log files.

  • co/log: improve stack trace, use libbacktrace instead of fork()+backtrace().

  • Add os::env(name, value) for setting value of environment variables.

  • Always use / as the path separator, and convert \ to / in results of os::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*) to tcp::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