r*g
4 楼
好难,什么东西
M*i
10 楼
create an class wrapping up on the mutex. unlock this mutex in the
destructor of the class.
Whenever the application uses the mutex, it create object of this class
instead of using mutex directly. Then the destructor will unlock the mutex
automatically.
when
【在 b**********5 的大作中提到】
: what destructor??!!
: it's for mutex. let's say ppl forgot to unlock a lock, the key here is when
: to unlock that lock automatically.
destructor of the class.
Whenever the application uses the mutex, it create object of this class
instead of using mutex directly. Then the destructor will unlock the mutex
automatically.
when
【在 b**********5 的大作中提到】
: what destructor??!!
: it's for mutex. let's say ppl forgot to unlock a lock, the key here is when
: to unlock that lock automatically.
D*a
11 楼
http://en.cppreference.com/w/cpp/thread/lock_guard
【在 a********r 的大作中提到】
: 估计是临时想出了这个题的。
: 写一个跟smart pointer 类似的mutex class, 忘记unlock也没风险了
【在 a********r 的大作中提到】
: 估计是临时想出了这个题的。
: 写一个跟smart pointer 类似的mutex class, 忘记unlock也没风险了
相关阅读
开发转测试经理H1B transfer premium process 今年10月会恢复吗?如果不考虑大苞谷 刷题和打农药你觉得哪个有意义?那说个正经的。 刷题时必须的OPT extension收到申请什么时候开始自动180天工作许可?准备面试java编程机器人的刷题水平如何亚麻 Sr SDE 岗位面试的问题还是谈谈职场撕逼的基本思路吧求助:Amazon哪些组能学到东西但是oncall又不重的?facebook强推--保证回复我给大家讲道题吧。【合集】讨论下刷题带来的缺点吧某章讲的东西感觉还挺有用晚上吃啥 QQ noodle?问一个题...哪里有题刷 哪里就有拳皇 题就是拳皇App:瞄准房屋,查看价格 (转载)i20原件丢了怎么办除了Google还有哪家不问system design啊