- 博客(4)
- 收藏
- 关注
原创 C++可阻断式休眠
class BlockableSleep { public: /** * @brief 开始休眠 * @ param [in] msec: 休眠时间/毫秒 */ bool Sleep(const long& msec) { struct timeval now; struct timespec outtime...
2019-07-03 17:21:11
357
原创 C++单例模式(线程安全)
懒汉模式 #include <mutex> #include <iostream> using namespace std; template<class T> class A { public: A(A&) = delete; A& operator=(const A&) = delete; static T* ...
2019-07-02 09:39:54
108
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人