![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
服务端编程
文章平均质量分 90
liuge
我们的征途是星辰大海
展开
-
muduo源码分析——TCPConnection 以及 bind导致的shared_ptr计数变化分析
注意问题原创 2021-04-13 22:56:22 · 1897 阅读 · 4 评论 -
muduo源码分析——chat
分析muduo的chat源码原创 2021-03-28 16:08:20 · 1283 阅读 · 5 评论 -
muduo源码分析3——TSD
#include <iostream>using namespace std;pthread_t tid1,tid2;pthread_key_t key;void deleter(void*){ cout<<"deleter"<<endl;}void* thread_fun2(void*){ int myValue = 2; int priValue = 11; pthread_setspecific(key,(void原创 2020-12-06 11:11:00 · 1061 阅读 · 10 评论 -
muduo源码分析2——Singleton分析
1. 一般singleton写法2. muduo::singleton原创 2020-12-06 00:08:21 · 2106 阅读 · 7 评论 -
C++中类成员函数被当作thread入参时注意点
1. pthread_create与std::threadpthread_create:void *(*start_routine) (void *) 注意入参的类型 #include <pthread.h> int pthread_create(pthread_t *thread, const pthread_attr_t *attr, void *(*start_routine) (void *), vo原创 2020-11-09 23:24:57 · 2853 阅读 · 5 评论