GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4Queue Class Reference

Base class for all threadsafe pointer queues. More...

#include <TGo4Queue.h>

+ Inheritance diagram for TGo4Queue:

Public Member Functions

 TGo4Queue (const char *name=nullptr)
 
virtual ~TGo4Queue ()
 
void Clear (Option_t *opt="") override
 
Int_t GetEntries () const
 
Bool_t IsEmpty () const
 
void SetMaxEntries (Int_t max)
 
virtual void Wake ()
 

Protected Member Functions

void Add (TObject *ob)
 
TObject * Next ()
 
TObject * Wait ()
 

Private Attributes

Bool_t fbWakeUpCall {kFALSE}
 
Int_t fiEntries {0}
 
Int_t fiMaxEntries {0}
 
TCondition * fxCondition {nullptr}
 
TList * fxList {nullptr}
 
TMutex * fxMutex {nullptr}
 

Detailed Description

Base class for all threadsafe pointer queues.

TObject pointers are transported in queue without streaming. Subclasses may specialize the behaviour on adding and waiting.

Author
J. Adamczewski
Since
13-Jul-2001

Definition at line 31 of file TGo4Queue.h.

Constructor & Destructor Documentation

◆ TGo4Queue()

◆ ~TGo4Queue()

TGo4Queue::~TGo4Queue ( )
virtual

Definition at line 34 of file TGo4Queue.cxx.

References fxCondition, fxList, and fxMutex.

Member Function Documentation

◆ Add()

◆ Clear()

void TGo4Queue::Clear ( Option_t * opt = "")
override

Definition at line 43 of file TGo4Queue.cxx.

References fxList, fxMutex, and TGo4LockGuard.

Referenced by TGo4ClientTask::DisconnectServer().

◆ GetEntries()

Int_t TGo4Queue::GetEntries ( ) const
inline

Definition at line 43 of file TGo4Queue.h.

References fiEntries.

◆ IsEmpty()

Bool_t TGo4Queue::IsEmpty ( ) const

◆ Next()

TObject * TGo4Queue::Next ( )
protected

Definition at line 61 of file TGo4Queue.cxx.

References fxList, fxMutex, and TGo4LockGuard.

Referenced by TGo4BufferQueue::Clear(), and Wait().

◆ SetMaxEntries()

void TGo4Queue::SetMaxEntries ( Int_t max)
inline

Definition at line 45 of file TGo4Queue.h.

References fiMaxEntries.

◆ Wait()

TObject * TGo4Queue::Wait ( )
protected

Definition at line 49 of file TGo4Queue.cxx.

References fbWakeUpCall, fxCondition, IsEmpty(), and Next().

Referenced by TGo4BufferQueue::WaitBuffer(), and TGo4ObjectQueue::WaitObject().

◆ Wake()

void TGo4Queue::Wake ( )
virtual

Definition at line 86 of file TGo4Queue.cxx.

References fbWakeUpCall, and fxCondition.

Referenced by TGo4TaskHandler::StopTransportThreads().

Field Documentation

◆ fbWakeUpCall

Bool_t TGo4Queue::fbWakeUpCall {kFALSE}
private

Definition at line 58 of file TGo4Queue.h.

Referenced by TGo4Queue(), Wait(), and Wake().

◆ fiEntries

Int_t TGo4Queue::fiEntries {0}
private

Definition at line 56 of file TGo4Queue.h.

Referenced by TGo4Queue(), and GetEntries().

◆ fiMaxEntries

Int_t TGo4Queue::fiMaxEntries {0}
private

Definition at line 57 of file TGo4Queue.h.

Referenced by TGo4Queue(), Add(), and SetMaxEntries().

◆ fxCondition

TCondition* TGo4Queue::fxCondition {nullptr}
private

Definition at line 54 of file TGo4Queue.h.

Referenced by TGo4Queue(), ~TGo4Queue(), Add(), Wait(), and Wake().

◆ fxList

TList* TGo4Queue::fxList {nullptr}
private

Definition at line 55 of file TGo4Queue.h.

Referenced by TGo4Queue(), ~TGo4Queue(), Add(), Clear(), IsEmpty(), and Next().

◆ fxMutex

TMutex* TGo4Queue::fxMutex {nullptr}
private

Definition at line 53 of file TGo4Queue.h.

Referenced by TGo4Queue(), ~TGo4Queue(), Add(), Clear(), IsEmpty(), and Next().


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