Reference

ACE_TSS_Write_Guard(3)

This class is similar to class ACE_TSS_Guard, though it acquires/releases a write-lock automatically (naturally, the ACE_LOCK it is instantiated with must support the appropriate API).

NAME

ACE_TSS_Write_Guard - This class is similar to class ACE_TSS_Guard, though it acquires/releases a write-lock automatically (naturally, the ACE_LOCK it is instantiated with must support the appropriate API).

SYNOPSIS

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

Initialization method.

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

Implicitly and automatically acquire the thread-specific write lock.

Lock accessors.

int acquire_write (void);

Explicitly acquire the thread-specific write lock.

int acquire (void);

Explicitly acquire the thread-specific write lock.

int tryacquire_write (void);

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

int tryacquire (void);

Conditionally acquire the thread-specific write 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.

AUTHOR

Doug Schmidt

LIBRARY

ace