CernVM-FS  2.9.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
cvmfs::Fetcher::ThreadLocalStorage Struct Reference
Collaboration diagram for cvmfs::Fetcher::ThreadLocalStorage:

Public Member Functions

 ThreadLocalStorage ()
 

Public Attributes

Fetcherfetcher
 
int pipe_wait [2]
 
std::vector< int > other_pipes_waiting
 
download::JobInfo download_job
 

Detailed Description

Multiple threads might want to download the same object at the same time. If that happens, only the first thread performs the download. The other threads wait on a pipe for a notification from the first thread.

Definition at line 94 of file fetch.h.

Constructor & Destructor Documentation

cvmfs::Fetcher::ThreadLocalStorage::ThreadLocalStorage ( )
inline

Definition at line 95 of file fetch.h.

Member Data Documentation

download::JobInfo cvmfs::Fetcher::ThreadLocalStorage::download_job

It is sufficient to construct the JobInfo object once per thread, not on every call to Fetch().

Definition at line 119 of file fetch.h.

Referenced by cvmfs::Fetcher::Fetch(), and cvmfs::Fetcher::GetTls().

Fetcher* cvmfs::Fetcher::ThreadLocalStorage::fetcher

Used during cleanup to find tls_blocks_.

Definition at line 104 of file fetch.h.

Referenced by cvmfs::Fetcher::GetTls(), ThreadLocalStorage(), and cvmfs::TLSDestructor().

std::vector<int> cvmfs::Fetcher::ThreadLocalStorage::other_pipes_waiting

Writer ends of all the pipes of threads that want to download the same object.

Definition at line 114 of file fetch.h.

Referenced by cvmfs::Fetcher::Fetch(), and cvmfs::Fetcher::SignalWaitingThreads().

int cvmfs::Fetcher::ThreadLocalStorage::pipe_wait[2]

Wait on the reading end if another thread is already downloading the same object.

Definition at line 109 of file fetch.h.

Referenced by cvmfs::Fetcher::CleanupTls(), cvmfs::Fetcher::Fetch(), cvmfs::Fetcher::GetTls(), and ThreadLocalStorage().


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