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 | ) |
|
Definition at line 28 of file ONCRPCThreadCollection.cxx.
28 {
29
30
31 {
34 }
35
36
38
39 }
virtual void lock()=0
Interface to allow an object to lock itself when made const in SG.
◆ JoinAll()
| void JiveXML::ThreadCollection::JoinAll |
( |
| ) |
|
Definition at line 76 of file ONCRPCThreadCollection.cxx.
76 {
77
78
79
80
81
82
83
84
86
87
88 pthread_t thread;
89 {
92 }
93
94
95 pthread_join(thread,NULL);
96
97
98
100 }
101 }
size_t size() const
Number of registered mappings.
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
61
62 break ;
63 }
64
65 ++threadItr;
66 }
67
68
69
70
71 pthread_detach(thread);
72
73 }
virtual void erase() override final
Free all allocated elements and release memory back to the system.
◆ 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: