markparticle / WebServer

C++ Linux WebServer服务器
Apache License 2.0
3.49k stars 730 forks source link

异步日志判定 #95

Open MZB2021 opened 11 months ago

MZB2021 commented 11 months ago

在 log.cpp 中异步日志判定感觉不严谨。

截屏2023-10-04 16 23 46

这个判断如果 deque 满了就会直接将日志输出到 fp_ ,但是按着生产-消费者模型应该在pushback时阻塞,所以我认为应该把`deque->full()`判断去掉。

oo33shan commented 11 months ago

删掉会导致可能发生死锁