muduo源码
文章平均质量分 73
muduo源码
Nintendo_Nerd
这个作者很懒,什么都没留下…
展开
-
Muduo源码Base篇
Muduo异步日志先来看AsyncLogging类的定义class AsyncLogging : noncopyable{ public: AsyncLogging(const string& basename, off_t rollSize, int flushInterval = 3); ~AsyncLogging() { if (running_) { stop(); }原创 2021-05-02 10:53:58 · 139 阅读 · 0 评论 -
Muduo源码Base篇
Muduo日志首先看时间戳类这是TimeStamp类的定义class Timestamp : public muduo::copyable, public boost::equality_comparable<Timestamp>, public boost::less_than_comparable<Timestamp>{ public: /// /// Constucts an invali原创 2021-04-26 15:28:41 · 133 阅读 · 0 评论 -
Muduo源码Base篇
Muduo源码Base无界阻塞队列class BlockingQueue : noncopyable{ public: BlockingQueue() : mutex_(), notEmpty_(mutex_), queue_() { } void put(const T& x) { MutexLockGuard lock(mutex_); queue_.push_back(x); notEmpty_.notify原创 2021-04-20 16:51:09 · 225 阅读 · 3 评论 -
Muduo源码Base篇
Muduo源码BaseThread类class Thread : noncopyable{ public: typedef std::function<void ()> ThreadFunc; explicit Thread(ThreadFunc, const string& name = string()); // FIXME: make it movable in C++11 ~Thread(); void start(); int join();原创 2021-04-19 11:33:43 · 130 阅读 · 0 评论 -
Muduo源码Base篇
muduo源码BaseMutex类 Condition类首先看这个类class noncopyable{ public: noncopyable(const noncopyable&) = delete; void operator=(const noncopyable&) = delete; protected: noncopyable() = default; ~noncopyable() = default;};} // namespace mud原创 2021-04-15 16:29:13 · 87 阅读 · 0 评论