librf
|
无死锁的批量枷锁。 更多...
Public 成员函数 | |
batch_lock_t (_Cont &locks_) | |
通过锁容器构造,并立刻应用加锁算法。 | |
batch_lock_t (_Cont &locks_, _Assemble &la_) | |
通过锁容器和锁集合构造,并立刻应用加锁算法。 | |
batch_lock_t (std::adopt_lock_t, _Cont &locks_) | |
通过锁容器构造,容器里的锁已经全部获得。 | |
batch_lock_t (std::adopt_lock_t, _Cont &locks_, _Assemble &la_) | |
通过锁容器和锁集合构造,容器里的锁已经全部获得。 | |
~batch_lock_t () noexcept | |
析构函数里,释放容器里的锁。 | |
void | unlock () |
手工释放容器里的锁,析构函数里将不再有释放操作。 | |
batch_lock_t (const batch_lock_t &)=delete | |
不支持拷贝构造。 | |
batch_lock_t & | operator= (const batch_lock_t &)=delete |
不支持拷贝赋值。 | |
batch_lock_t (batch_lock_t &&_Right) | |
支持移动构造。 | |
batch_lock_t & | operator= (batch_lock_t &&_Right) |
支持移动赋值。 | |
无死锁的批量枷锁。
_Ty | 锁的类型。例如std::mutex,resumef::spinlock,resumef::mutex_t(线程用法)均可。 |
_Cont | 容纳一批锁的容器。 |
_Assemble | 与_Cont配套的锁集合,特化了如何操作_Ty。 |