Giter VIP home page Giter VIP logo

xchange's Introduction

xchange

This project is still under developing and further testing is required. So you should NOT use it in any of your business project.

introduction

xchange is a C++ infrastructure library including(current master branch):

  1. noncopyable, singletone
  2. EventEmitter base class, a event publish/subscribe model, i love Javascript
  3. LockFreeQueue
  4. Mutex Condition
  5. Thread
  6. Thread Pool based on lock-free structure
  7. RedBlackTree
  8. Buffer, Cache(ring buffer)
  9. IOMananger interface: epoll, select(unimplemented), poll(unimplemented)
  10. Timer/Timestamp, implemented by signal, inaccuracy is less than 0.005s

This library is designed for such purposes:

  1. easy to use
  2. easy to read
  3. easy to understand

and also, other features will be added(including Network interface, IO, etc)

xchange是一个我自己的c++基础设施,其中的一些**和思路参考了Boost和muduo。当前已经开发完成的功能有:

  1. noncopyable基类,Singleton单例模板(参考Boost的实现)
  2. EventEmitter基类,一个事件发布/订阅模型,JS天下无敌
  3. 无锁队列
  4. 互斥量,条件量
  5. 线程的基本封装,接口设计参考了C++11的Thread
  6. 基于无锁结构的线程池,实现中不包含互斥量和条件量
  7. 红黑树
  8. IO常用的Buffer和Cache(循环缓冲区)封装
  9. 基于事件订阅/发布模型的IOManager接口,目前有EpollManager,还会实现基于select和poll的Manager
  10. 定时器和时间戳,采用信号中断实现,误差初步测试小于0.005s

总之就是要实现一个使用方便、代码可读性强、易于理解的C++基础设施,后面还会添加网络操作和IO操作的特性,敬请期待。目前还没有来得及写详细的文档,有兴趣的同学可以看看头文件和test目录下的小例子。

xchange's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

windr00

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.