当前位置:网站首页>muduo库学习记录(一)
muduo库学习记录(一)
2022-07-30 06:27:00 【langko】
1.p280
muduo::Thread thread(threadFunc);
thread.start();
//这种实例化的方式,可能是内部调用了std::thread() //补充:是这样的
使用了匿名函数执行
std::thread有默认构造函数,所以我们可以写匿名函数来进行thread调用
2.与其他库集成,p271
resolve()里面并没有指定addr,为什么在resolveCallback里能拿到addr
<netdb.h>
gethostbyname //linux函数,man可以查到
<ares.h>
//在linux下,先后输入
sudo apt-get install libc-ares-dev
sudo apt-get install libc-ares2
//再次编译,则可以通过
四个步骤,runAfter注册定时器回调
3. handle/body 模式
抽象类和具体类的实现分离
4.状态机模式
5.weak_ptr的两个功能
1.监听:
2.弱回调:
6.lock free:就是使用atomic
7.p29
可变参数实现一对多回调
8.p38
gdb ./xxx core,thread apply all bt等获取调用栈 //这命令不死锁没啥用,bt调用栈的意思
https://www.cnblogs.com/charlesblc/p/6256912.html
9.p40
条件变量的使用方式
10.pthread_barrier
11.ptmalloc3
12.printf()线程安全,但是阻塞
cout线程不安全,因为是链式调用
//另一本书
13.sendfile(),tee()函数零拷贝技术
14.解析http请求
边栏推荐
- DP5340 domestic replacement for CM5340 stereo audio A/D converter chip
- IDEA search plug-in has no results and the solution has been spinning in circles
- Ali: How many methods are there for multi-threaded sequential operation?
- this与super
- interface
- SkiaSharp 之 WPF 自绘 拖曳小球(案例版)
- go : create database records using gorm
- Vue项目通过node连接MySQL数据库并实现增删改查操作
- Electron中设置菜单(Menu),主进程向渲染进程共享数据
- “AI教练”请进家,家庭智能健身蓬勃发展
猜你喜欢
C language custom types, rounding
Architectural Design Guide How to Become an Architect
Go uses the mencached cache
Go uses freecache for caching
大飞机C919都用了哪些新材料?
From catching up to surpassing, domestic software shows its talents
What are the access modifiers, declaration modifiers, and keywords in C#?Literacy articles
Handler消息机制-Native层
BGP:边界网关路由协议 无类别的路径矢量EGP协议
UDP和TCP使用同一个端口,可行吗?
随机推荐
Derivative Operations on Vectors and Derivative Operations on Vector Cross and Dot Products
【day5】数组
ETL为什么经常变成ELT甚至LET?
Get all interface paths and names in the controller
SOFA Weekly|Meetup 广州站、本周 QA、本周 Contributor
解决datagrip连接sqlserver报错:[08S01] 驱动程序无法通过使用安全套接字层(SSL)加密与 SQL Server 建立安全连接。
From catching up to surpassing, domestic software shows its talents
assert
Go语学习笔记 - gorm使用 - 数据库配置、表新增 Web框架Gin(七)
selenium模块
2022牛客暑期多校训练营3(ACFGJ)
sizeof
Electron日常学习笔记
Keil编译大小和存储说明
【防作弊】Unity防本地调时间作弊
【Codeforces Round #805 (Div. 3)(A~C)】
ArrayList
mysql8的my.conf配置文件参考指引
Ali: How many methods are there for multi-threaded sequential operation?
Go: use gorm query record