add run worker method

This commit is contained in:
2021-01-10 15:22:41 +01:00
parent 1e3c14ec51
commit 07a8b49373

View File

@@ -43,14 +43,25 @@ std::vector<operation> generate_operations_uniform(){
} }
} }
//void run_worker(std::vector<operation>* operations, Set* set) { void run_worker(std::vector<operation>* operations, Stack* stack) {
// DEBUG_MSG("Run worker"); std::cout << "Worker: start" << std::endl;
// long op_counter = 0; long op_counter = 0;
// for (operation op : operations) { for (operation op : *operations) {
/* code */ switch (op.method) {
// do_operation(&op, set); case methodname::pop:
// } stack->pop();
//} break;
case methodname::push:
stack->push(op.value);
break;
default:
stack->size();
break;
}
}
std::cout << "Worker: done" << std::endl;
}
void run_checker(ADTOperationQueue queue, int* done_count) { void run_checker(ADTOperationQueue queue, int* done_count) {
ADTStack * adt_stack = new ADTStack(); ADTStack * adt_stack = new ADTStack();