Skip to content

Commit

Permalink
Refactoring the old codes.
Browse files Browse the repository at this point in the history
  • Loading branch information
berkkirtay committed Sep 16, 2021
1 parent 474b776 commit f1edcd3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/Encryptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ class Encryptor {
std::vector<long> dec3;
std::vector<long> dec4;

std::thread thrd1([&] {decryptionThread(dec1, 0, textLines.size()); });
// std::thread thrd2([&] {decryptionThread(dec2, textLines.size() / 4, textLines.size() / 2); });
// std::thread thrd3([&] {decryptionThread(dec3, textLines.size() / 2, (textLines.size() * 3) / 4); });
// std::thread thrd4([&] {decryptionThread(dec4, (textLines.size() * 3) / 4, textLines.size()); });
std::thread thrd1([&] {decryptionThread(dec1, 0, textLines.size() / 4); });
std::thread thrd2([&] {decryptionThread(dec2, textLines.size() / 4, textLines.size() / 2); });
std::thread thrd3([&] {decryptionThread(dec3, textLines.size() / 2, (textLines.size() * 3) / 4); });
std::thread thrd4([&] {decryptionThread(dec4, (textLines.size() * 3) / 4, textLines.size()); });

thrd1.join();
// thrd2.join();
// thrd3.join();
// thrd4.join();
thrd2.join();
thrd3.join();
thrd4.join();

for (int i = 0; i < dec1.size(); i++) {
decryptedDATA.push_back(dec1[i]);
Expand Down

0 comments on commit f1edcd3

Please sign in to comment.