Back to index

nordugrid-arc-nox  1.1.0~rc6
Public Member Functions | Private Member Functions | Private Attributes | Friends
ARex::CountedResource Class Reference

#include <arex.h>

List of all members.

Public Member Functions

 CountedResource (int maxconsumers=-1)
 ~CountedResource (void)
void MaxConsumers (int maxconsumers)

Private Member Functions

void Acquire (void)
void Release (void)

Private Attributes

Glib::Cond cond_
Glib::Mutex lock_
int limit_
int count_


class CountedResourceLock

Detailed Description

Definition at line 19 of file arex.h.

Constructor & Destructor Documentation

ARex::CountedResource::CountedResource ( int  maxconsumers = -1)

Definition at line 103 of file arex.cpp.

                        limit_(maxconsumers),count_(0) {

Definition at line 107 of file arex.cpp.


Member Function Documentation

void ARex::CountedResource::Acquire ( void  ) [private]

Definition at line 83 of file arex.cpp.

  while((limit_ >= 0) && (count_ >= limit_)) {

Here is the caller graph for this function:

void ARex::CountedResource::MaxConsumers ( int  maxconsumers)

Definition at line 99 of file arex.cpp.

  limit_ = maxconsumers;

Here is the caller graph for this function:

void ARex::CountedResource::Release ( void  ) [private]

Definition at line 92 of file arex.cpp.


Here is the caller graph for this function:

Friends And Related Function Documentation

friend class CountedResourceLock [friend]

Definition at line 20 of file arex.h.

Member Data Documentation

Glib::Cond ARex::CountedResource::cond_ [private]

Definition at line 26 of file arex.h.

Definition at line 29 of file arex.h.

Definition at line 28 of file arex.h.

Glib::Mutex ARex::CountedResource::lock_ [private]

Definition at line 27 of file arex.h.

The documentation for this class was generated from the following files: