ACE_TSS_Read_Guard(3)

ACE_TSS_Read_Guard3

This class is similar to class ace_tss_guard, though it acquires/releases a read lock automatically (naturally, the ace_lock it is instantiated with must support the appropriate api).

Usage

#include <ace/Synch_T.h>
template<class ACE_LOCK>
class ACE_TSS_Read_Guard : public ACE_TSS_Guard<ACE_LOCK>
{
  public:
    ACE_TSS_Read_Guard (ACE_LOCK &lock, int block = 1);
    int acquire_read (void);
    int acquire (void);
    int tryacquire_read (void);
    int tryacquire (void);
    void dump (void) const;
};

Initialization method.

ACE_TSS_Read_Guard (ACE_LOCK &lock, int block = 1);

Implicitly and automatically acquire the thread-specific read lock.

Lock accessors.

int acquire_read (void);

Explicitly acquire the thread-specific read lock.

int acquire (void);

Explicitly acquire the thread-specific read lock.

int tryacquire_read (void);

Conditionally acquire the thread-specific read lock (i.e., won't block).

int tryacquire (void);

Conditionally acquire the thread-specific read lock (i.e., won't block).

Utility methods.

void dump (void) const;

Dump the state of an object.

ACE_ALLOC_HOOK_DECLARE; Declare the dynamic allocation hooks.

Library

ace

Author

Doug Schmidt

From libace-doc 5.0.7-4 in Debian 2.2 (Potato). Parsed by carta from the page's man source.