|
|
|
Home / Open source / Terimber 2.0
keylocker Class Referenceclass supports the locking on demand functionality
More...
#include <keymaker.h>
List of all members.
Detailed Description
class supports the locking on demand functionality
Definition at line 38 of file keymaker.h.
Constructor & Destructor Documentation
BEGIN_TERIMBER_NAMESPACE keylocker::keylocker |
( |
size_t |
capacity = os_def_size |
) |
[inline] |
constructor
- Parameters:
-
capacity |
max locker capacity for read-only locks |
Definition at line 38 of file keymaker.hpp.
Member Function Documentation
bool keylocker::enter |
( |
size_t |
timeout |
) |
const [inline] |
read-only lock
client functions - Parameters:
-
timeout |
timeout in milliseconds |
Definition at line 52 of file keymaker.hpp.
References _access_mtx, _capacity, _clients, _ev_client, _ev_open, _opened, date::get_difference(), mutex_keeper::lock(), mutex_keeper::unlock(), and event::wait().
Referenced by keylocker_client::enter(), keylocker_client::keylocker_client(), msg_communicator::loan_communicator(), and pool< C >::loan_object().
void keylocker::leave |
( |
|
) |
const [inline] |
read-only unlock
Definition at line 106 of file keymaker.hpp.
References _access_mtx, _clients, _ev_client, _ev_close, _opened, event::signal(), and mutex_keeper::unlock().
Referenced by keylocker_client::leave(), msg_communicator::loan_communicator(), pool< C >::loan_object(), msg_communicator::return_communicator(), pool< C >::return_object(), and keylocker_client::~keylocker_client().
bool keylocker::lock |
( |
size_t |
timeout |
) |
const [inline] |
writes lock
server functions - Parameters:
-
timeout |
timeout in milliseconds |
Definition at line 129 of file keymaker.hpp.
References _access_mtx, _clients, _ev_close, _ev_open, _ev_server, _opened, _server_mtx, date::get_difference(), mutex_keeper::lock(), mutex::lock(), event::nonsignal(), event::signal(), mutex::unlock(), mutex_keeper::unlock(), and event::wait().
Referenced by keylocker_server::keylocker_server(), and keylocker_server::lock().
void keylocker::unlock |
( |
|
) |
const [inline] |
Member Data Documentation
max read-onlyy clients allowed
Definition at line 66 of file keymaker.h.
Referenced by enter().
The documentation for this class was generated from the following files:
|
|
|
|