随笔分类 -  C++库

摘要:Synchronized C++多线程编程的痛点 - 锁与数据是分开的 struct RequestHandler { RequestQueue requestQueue_; SharedMutex requestQueueMutex_; std::map<std::string, Endpoint 阅读全文
posted @ 2024-01-06 19:53 SchemaL 阅读(57) 评论(0) 推荐(0)
摘要:folly中的KeepAlive KeepAlive是什么? 本质上是Executor的一个指针,如果Executor支持keepAlive功能,那么只要有一个指向该Executor的KeepAlive对象还存活,那么这个Executor就不会被析构。 KeepAlive实现的原理? KeepAli 阅读全文
posted @ 2024-01-03 13:34 SchemaL 阅读(76) 评论(0) 推荐(0)