The constructor and destructor of the queue class are responsible for the creation and destruction of the mutex, as shown in Listing 1.
队列类的构造函数和析构函数负责创建和销毁互斥锁,见清单1。
Class with only 1 method, is it safe to let it handle it's own mutex?
只有1个方法的类,它是安全的,让它处理它自己的锁?
Class with only 1 method, is it safe to let it handle it's own mutex?
只有1个方法的类,它是安全的,让它处理它自己的锁?
应用推荐