Skip to content

yinghaoyu/easy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

easy

日志

  • 支持不同种类的输出目标,比如标准输出、文件。
  • 支持类似 log4j 的输出格式���置。
    • %p:输出日志级别。
    • %r:输出从应用程序启动到输出该 Log 事件所耗费的毫秒数。
    • %t:输出产生该日志事件的线程id。
    • %n:输出一个回车换行符。相当于换了一行。
    • %d:输出日志时间点的日期或时间,可以在其后指定格式,比如 %d{yyy-MM-dd HH:mm:ss.%06ld}。
    • %F:输出日志消息产生时所在的文件名称。
    • %f:输出日志消息产生时所在的函数名称。
    • %L:输出代码中的行号。

协程及调度器

  • 协程基于 ucontext_t cluster
  • 每个协程都使用独立的栈。
  • 线程的 root 协程可以不要栈空间,只负责调度,当然调度协程不一定得是 root 协程。
  • 调度器支持协程调度到其他线程。
  • 调度器采用简单的 Round-robin 策略。
  • 一个 N * M 的调度器,n 个线程,m个协程,协程可以切换到任意线程上。

参考链接

  1. https://github.com/chenshuo/muduo
  2. https://github.com/sylar-yin/sylar
  3. https://github.com/gabime/spdlog
  4. https://github.com/oceanbase/oceanbase
  5. https://github.com/alibaba/yalantinglibs

About

C++11 network library.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages