This class handles a collection of threads.
More...
#include <ONCRPCThreadCollection.h>
This class handles a collection of threads.
Definition at line 18 of file ONCRPCThreadCollection.h.
◆ ThreadCollection()
| JiveXML::ThreadCollection::ThreadCollection |
( |
| ) |
|
◆ ~ThreadCollection()
| JiveXML::ThreadCollection::~ThreadCollection |
( |
| ) |
|
◆ AddThread()
| void JiveXML::ThreadCollection::AddThread |
( |
const pthread_t & | thread | ) |
|
◆ JoinAll()
| void JiveXML::ThreadCollection::JoinAll |
( |
| ) |
|
Definition at line 76 of file ONCRPCThreadCollection.cxx.
76 {
77
78
79
80
81
82
83
84
85 while ( size() > 0 ){
86
87
88 pthread_t thread;
89 {
92 }
93
94
95 pthread_join(thread,NULL);
96
97
98
100 }
101 }
void RemoveThread(const pthread_t &thread)
◆ NumberOfThreads()
| int JiveXML::ThreadCollection::NumberOfThreads |
( |
| ) |
|
◆ RemoveThread()
| void JiveXML::ThreadCollection::RemoveThread |
( |
const pthread_t & | thread | ) |
|
Definition at line 49 of file ONCRPCThreadCollection.cxx.
49 {
50
51
53
54
55 ThreadCollection::iterator threadItr =
begin();
56 while ( threadItr !=
end() ){
57
58 if ( *threadItr == thread ){
59
60 erase(threadItr);
61
62 break ;
63 }
64
65 ++threadItr;
66 }
67
68
69
70
71 pthread_detach(thread);
72
73 }
◆ WaitAdd()
| void JiveXML::ThreadCollection::WaitAdd |
( |
| ) |
|
◆ elements
| T std::vector< T >::elements |
|
inherited |
◆ m_mutex
| std::mutex JiveXML::ThreadCollection::m_mutex |
|
private |
◆ m_semaphore
| sem_t JiveXML::ThreadCollection::m_semaphore |
|
private |
The documentation for this class was generated from the following files: