Skip to content

Commit

Permalink
3 cout
Browse files Browse the repository at this point in the history
  • Loading branch information
zazizizou committed Dec 4, 2017
1 parent 37971d8 commit 6308ba2
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions Ex5_Chrispens_Gahbiche/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -242,32 +242,37 @@ void futurePormise(const int startValue, const std::size_t nMax) {

}).detach();


size_t n = 0;
while(n<futureP3.size() && futureP3[n].valid()){
// wird nicht richtig ausgeführt.

std::cout << "n: " << n << std::endl;
auto next = futureP3[n].get();
for(auto m0 : std::get<0>(next)){
for (auto m0 : std::get<0>(next)) {
std::cout << "Final Result using future/promise m0: " << m0 << std::endl;
}
for(auto m1 : std::get<1>(next)){
for (auto m1 : std::get<1>(next)) {
std::cout << "Final Result using future/promise m1: " << m1 << std::endl;
}
n++;
}


}


int main(int argc, char *argv[]) {
try {
producerConsumerQueue(9, 100); //10000000
producerConsumerQueue(9, 10000000); //10000000
std::cout << "All tests ran successfully." << std::endl;
}
catch (const std::exception &e) {
std::cerr << "Error: " << e.what() << std::endl;
return 1;
}
try {
futurePormise(9, 100); //10000000
futurePormise(9, 10000000); //10000000
std::cout << "All tests ran successfully." << std::endl;
}
catch (const std::exception &e) {
Expand Down

0 comments on commit 6308ba2

Please sign in to comment.