vdr  2.6.1
Public Member Functions | Static Public Member Functions | Private Attributes | Static Private Attributes | List of all members
cIoThrottle Class Reference

#include <thread.h>

Public Member Functions

 cIoThrottle (void)
 
 ~cIoThrottle ()
 
void Activate (void)
 
void Release (void)
 
bool Active (void)
 

Static Public Member Functions

static bool Engaged (void)
 

Private Attributes

bool active
 

Static Private Attributes

static cMutex mutex
 
static int count = 0
 

Detailed Description

Definition at line 267 of file thread.h.

Constructor & Destructor Documentation

◆ cIoThrottle()

cIoThrottle::cIoThrottle ( void  )

Definition at line 886 of file thread.c.

References active.

◆ ~cIoThrottle()

cIoThrottle::~cIoThrottle ( )

Definition at line 891 of file thread.c.

References Release().

Member Function Documentation

◆ Activate()

void cIoThrottle::Activate ( void  )

Activates the global I/O throttling mechanism.

This function may be called any number of times, but only the first call after an inactive state will have an effect.

Definition at line 896 of file thread.c.

References active, count, dsyslog, cMutex::Lock(), mutex, cThread::ThreadId(), and cMutex::Unlock().

Referenced by cRingBuffer::UpdatePercentage().

◆ Active()

bool cIoThrottle::Active ( void  )
inline

Returns true if this I/O throttling object is currently active.

Definition at line 283 of file thread.h.

References active.

◆ Engaged()

bool cIoThrottle::Engaged ( void  )
static

Returns true if any I/O throttling object is currently active.

Definition at line 918 of file thread.c.

References count.

Referenced by cRemoveDeletedRecordingsThread::Action(), cVideoDirectoryScannerThread::ScanVideoDir(), cCuttingThread::Throttled(), and cDirCopier::Throttled().

◆ Release()

void cIoThrottle::Release ( void  )

Releases the global I/O throttling mechanism.

This function may be called any number of times, but only the first call after an active state will have an effect.

Definition at line 907 of file thread.c.

References active, count, dsyslog, cMutex::Lock(), mutex, cThread::ThreadId(), and cMutex::Unlock().

Referenced by cRingBuffer::UpdatePercentage(), and ~cIoThrottle().

Member Data Documentation

◆ active

bool cIoThrottle::active
private

Definition at line 271 of file thread.h.

Referenced by Activate(), Active(), cIoThrottle(), and Release().

◆ count

int cIoThrottle::count = 0
staticprivate

Definition at line 270 of file thread.h.

Referenced by Activate(), Engaged(), and Release().

◆ mutex

cMutex cIoThrottle::mutex
staticprivate

Definition at line 269 of file thread.h.

Referenced by Activate(), and Release().


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