Samchon Framework for CPP  1.0.0
ExternalServerArray.cpp
1 #include <samchon/protocol/ExternalServerArray.hpp>
2 
3 #include <samchon/protocol/ExternalSystem.hpp>
4 
5 #include <vector>
6 #include <thread>
7 
8 using namespace std;
9 using namespace samchon::protocol;
10 
11 ExternalServerArray::ExternalServerArray()
12  : super()
13 {
14 }
16 {
17  vector<thread> threadArray;
18  for(size_t i = 0; i < size(); i++)
19  threadArray.emplace_back(&ExternalSystem::start, at(i).get());
20 
21  for(size_t i = 0; i < threadArray.size(); i++)
22  threadArray[i].join();
23 }
virtual void start() override
Start interaction.
Definition: RWMutex.hpp:4
Package of network protocol and libraries.
Definition: protocol.hpp:185
virtual void start()=0
Start interaction.