【发布时间】:2014-08-14 19:32:43
【问题描述】:
谁能解释一下下面文本中的语句(在先决条件下)的含义以及它在线程中的意义?
此文本可在boost threading tutorial page 获得
unique_lock(Lockable & m,boost::adopt_lock_t)
Precondition:
**The current thread owns an exclusive lock on m.**
Effects:
**Stores a reference to m. Takes ownership of the lock state of m.**
Postcondition:
owns_lock() returns true. mutex() returns &m.
Throws:
Nothing.
【问题讨论】:
标签: multithreading boost