24 lines
419 B
C++
24 lines
419 B
C++
#include "shared_queue.hh"
|
|
#include "threadpool.hh"
|
|
|
|
#include <string>
|
|
#include <iostream>
|
|
int main() {
|
|
|
|
std::cout << "Set up ThreadPool" << std::endl;
|
|
ThreadPool tp;
|
|
|
|
std::cout << "Add Producer" << std::endl;
|
|
tp.addProducer();
|
|
|
|
std::cout << "Add Consumers" << std::endl;
|
|
tp.addConsumer();
|
|
tp.addConsumer();
|
|
|
|
std::cout << "Run" << std::endl;
|
|
tp.run();
|
|
|
|
std::cout << "Finishing up" << std::endl;
|
|
|
|
return 0;
|
|
}
|