XRootD
Loading...
Searching...
No Matches
XrdCl::StreamMutexHelper Class Reference

#include <XrdClStream.hh>

Collaboration diagram for XrdCl::StreamMutexHelper:

Public Member Functions

 StreamMutexHelper (StreamMutex &sm)
 StreamMutexHelper (StreamMutex &sm, const std::function< void()> &func, bool &isclosing)
 StreamMutexHelper (StreamMutex &sm, uint16_t idx, bool &isclosing)
 ~StreamMutexHelper ()
void UnLock ()

Public Attributes

StreamMutexmtx

Detailed Description

StreamMutexHelper

A scoped lock for StreamMutex.

Definition at line 129 of file XrdClStream.hh.

Constructor & Destructor Documentation

◆ StreamMutexHelper() [1/3]

XrdCl::StreamMutexHelper::StreamMutexHelper ( StreamMutex & sm)
inline

Definition at line 132 of file XrdClStream.hh.

132 : mtx( &sm )
133 {
134 mtx->Lock();
135 }

References mtx.

◆ StreamMutexHelper() [2/3]

XrdCl::StreamMutexHelper::StreamMutexHelper ( StreamMutex & sm,
uint16_t idx,
bool & isclosing )
inline

Definition at line 137 of file XrdClStream.hh.

138 : mtx( &sm )
139 {
140 mtx->Lock( idx, isclosing );
141 if( isclosing ) mtx = nullptr;
142 }

References mtx.

◆ StreamMutexHelper() [3/3]

XrdCl::StreamMutexHelper::StreamMutexHelper ( StreamMutex & sm,
const std::function< void()> & func,
bool & isclosing )
inline

Definition at line 144 of file XrdClStream.hh.

145 : mtx( &sm )
146 {
147 mtx->Lock( func, isclosing );
148 if( isclosing ) mtx = nullptr;
149 }

References mtx.

◆ ~StreamMutexHelper()

XrdCl::StreamMutexHelper::~StreamMutexHelper ( )
inline

Definition at line 151 of file XrdClStream.hh.

152 {
153 UnLock();
154 }

References UnLock().

Here is the call graph for this function:

Member Function Documentation

◆ UnLock()

void XrdCl::StreamMutexHelper::UnLock ( )
inline

Definition at line 156 of file XrdClStream.hh.

157 {
158 if( !mtx ) return;
159 mtx->UnLock();
160 mtx = nullptr;
161 }

References mtx.

Referenced by ~StreamMutexHelper(), XrdCl::Stream::OnError(), XrdCl::Stream::OnReadTimeout(), XrdCl::Stream::OnReadyToWrite(), and XrdCl::Stream::Tick().

Here is the caller graph for this function:

Member Data Documentation

◆ mtx

StreamMutex* XrdCl::StreamMutexHelper::mtx

Definition at line 163 of file XrdClStream.hh.

Referenced by StreamMutexHelper(), StreamMutexHelper(), StreamMutexHelper(), and UnLock().


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