摘要:
StringPiece 在 StringPiece.h 文件中,声明了两个类类型,一个是 StringArg,另一个是 StringPiece,前者用于在传递函数参数时同时兼容 C 风格的字符串(const char*)和 C++ 风格的字符串(std::string)。而后者则可用于构建同时兼任这 阅读全文
摘要:
CurrentThread 在 CurrentThread 命名空间中实现了有关线程 id 的管理和优化。其主要用于获取当前线程的 id,并将线程 id 保存为 C 语言风格的字符串: extern __thread int t_cachedTid; // 线程id extern __thread 阅读全文