MCPcopy Create free account
hub / github.com/834810071/muduo_study / append

Method append

base/AsyncLogging.cpp:41–69  ·  view source on GitHub ↗

Description : 前端在生成一条日志消息时,会调用AsyncLogging::append()。 如果currentBuffer_够用,就把日志内容写入到currentBuffer_中, 如果不够用(就认为其满了),就把currentBuffer_放到已满buffer数组中, 等待消费者线程(即后台线程)来取。则将预备好的另一块缓冲 (nextBuffer_)移用为当前缓冲区(currentBuffer_)。 *********************************************************************/

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

threadFuncMethod · 0.45

Calls 3

availMethod · 0.80
resetMethod · 0.45
notifyMethod · 0.45

Tested by

no test coverage detected