¡@

Home 

c++ Programming Glossary: lk

C++11 reentrant class locking strategy

http://stackoverflow.com/questions/13240015/c11-reentrant-class-locking-strategy

lock is held. template typename LockType bool bar LockType lk std size_t len char dst const template typename LockType std.. typename LockType std size_t bar_capacity LockType lk const bar_set requires a unique lock bool bar_set unique_lock_t.. bar_set requires a unique lock bool bar_set unique_lock_t lk const std size_t len const char src template typename LockType..

Thread safe implementation of circular buffer

http://stackoverflow.com/questions/9743605/thread-safe-implementation-of-circular-buffer

int n cb.set_capacity n void send T imdata lock lk monitor cb.push_back imdata buffer_not_empty.notify_one T receive.. imdata buffer_not_empty.notify_one T receive lock lk monitor while cb.empty buffer_not_empty.wait lk T imdata cb.front.. lock lk monitor while cb.empty buffer_not_empty.wait lk T imdata cb.front cb.pop_front return imdata void clear lock..

What are the semantics of a const member function?

http://stackoverflow.com/questions/98705/what-are-the-semantics-of-a-const-member-function

m public void set_data int i boost lock_guard boost mutex lk m data i int get_data const we want to be able to get the data.. the data on a const object boost lock_guard boost mutex lk m this requires m to be non const return data If you hold the..