![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
源码阅读
文章平均质量分 93
hang_ning
这个作者很懒,什么都没留下…
展开
-
Chomium MessageLoop实现原理
Chromium Message Loop主要类和功能MessagePump(LibEvent)如果是UI线程和IO线程会使用MessagePumpLibEvent 实现,其他线程则使用MessageDefault. 前者利用libEvent 的事件驱动特性,后者使用event 信号来控制线程阻塞和唤醒。当线程启动时,线程的入口函数ThreadMain会创建并启动 MessagePump, 开始任务轮转,该类会不断的向ThreadControllerWithMessagePumpImpl 发出D原创 2021-11-20 16:56:13 · 1380 阅读 · 0 评论 -
Redis 学习笔记
Redis 笔记数据结构Redis 有两级的数据结构, 对外的数据结构由 RedisObject 表示:简称robj, 是数据的对外表示形式, 其具体实现根据不同的情况有所不同.// robj对象的构成typedef struct redisObject { unsigned type:4; unsigned encoding:4; unsigned lru:LRU_BITS; /* LRU time (relative to global lru_clo原创 2021-09-05 15:08:40 · 109 阅读 · 0 评论 -
如何架一个http服务器? Tinyhttpd 源码学习
tinyhttpd是一个超轻量型Http Server 使用C语言开发,全部代码只有502行(包括注释),附带一个简单的Client,可以通过阅读这段代码理解一个 Http Server 的本质。 下载链接:http://sourceforge.net/projects/tinyhttpd/函数和宏声明#include <stdio.h>#include <sys/socket...原创 2018-06-28 09:43:11 · 268 阅读 · 0 评论