RCFProto

- Main Page
- Classes
- Files

- File List

All Classes Functions Typedefs
ThreadGroup.hpp
1
2 //******************************************************************************
3 // RCF - Remote Call Framework
4 //
5 // Copyright (c) 2005 - 2013, Delta V Software. All rights reserved.
6 // http://www.deltavsoft.com
7 //
8 // RCF is distributed under dual licenses - closed source or GPL.
9 // Consult your particular license for conditions of use.
10 //
11 // If you have not purchased a commercial license, you are using RCF
12 // under GPL terms.
13 //
14 // Version: 2.0
15 // Contact: support <at> deltavsoft.com
16 //
17 //******************************************************************************
18
19 #ifndef INCLUDE_RCF_TEST_THREADGROUP_HPP
20 #define INCLUDE_RCF_TEST_THREADGROUP_HPP
21
22 #include <vector>
23
24 #include <boost/shared_ptr.hpp>
25
26 #include <RCF/ThreadLibrary.hpp>
27
28 typedef RCF::Thread Thread;
29 typedef boost::shared_ptr<Thread> ThreadPtr;
30 typedef std::vector<ThreadPtr> ThreadGroup;
31
32 inline void joinThreadGroup(const ThreadGroup &threadGroup)
33 {
34 for (unsigned int i=0; i<threadGroup.size(); ++i)
35 {
36 threadGroup[i]->join();
37 }
38 }
39
40
41 #endif // ! INCLUDE_RCF_TEST_THREADGROUP_HPP