2017年2月11日

time clock getrusage clock_gettime gettimeofday timespec_get 对比

摘要: http://stackoverflow.com/questions/12392278/measure-time-in-linux-time-vs-clock-vs-getrusage-vs-clock-gettime-vs-gettimeof 阅读全文

posted @ 2017-02-11 20:39 明天有风吹 阅读(299) 评论(0) 推荐(0) 编辑

atomic write pipe

摘要: 阅读 skynet 代码 socket_server 部分,发现对 socket 的写操作流程是这样的: 1. 各个服务(各线程)将数据写到 sendctrl_fd,这是一个 pipe 的 写端 2. ctrl_cmd 函数从 recvctrl_fd 读出数据,然后写到真正的 socketfd 在第 阅读全文

posted @ 2017-02-11 10:18 明天有风吹 阅读(301) 评论(0) 推荐(0) 编辑

导航

+V atob('d2h5X251bGw=')

请备注:from博客园