Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CommandsProcessor(size_t countsOfThreads) {
- isInputStreamOver = false;
- commandsQueue = std::make_shared<std::queue<std::vector<std::string>>>(std::queue<std::vector<std::string>>{});
- countOfWorkingThreads = countsOfThreads;
- workers.reserve(countsOfThreads);
- for (size_t i = 0; i < countsOfThreads; i++) {
- IOFstreams.emplace_back(commandsQueue);
- workers.emplace_back(&OFThread::outputToFile, &IOFstreams[i]);
- }
- }
- CommandsProcessor(size_t countsOfThreads) {
- isInputStreamOver = false;
- commandsQueue = std::make_shared<std::queue<std::vector<std::string>>>(std::queue<std::vector<std::string>>{});
- countOfWorkingThreads = countsOfThreads;
- workers.reserve(countsOfThreads);
- for (size_t i = 0; i < countsOfThreads; i++) {
- IOFstreams.emplace_back(commandsQueue);
- }
- for (size_t i = 0; i < countsOfThreads; i++) {
- workers.emplace_back(&OFThread::outputToFile, &IOFstreams[i]);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement