privacore-open-source-searc.../test/unit/JobSchedulerTest01.cpp
Ivan Skytte Jørgensen be9840d1c0 Replaced Threads.* with a jobscheduler
Threads were being created and destroyed which can be expensive. The
thread-per-job model has been changed to a job scheduler that manages the job
queues and threads in pools. The submission of a job now specifies start/finish
routines, state, and as precisely what kind of job it is. The job scheduler then
takes care of the rest. it is hidden how many queues and pools there are.
2016-04-29 14:27:27 +02:00

23 lines
361 B
C++

#include "JobScheduler.h"
#include "Conf.h"
#include "Mem.h"
#include <assert.h>
#include <stdio.h>
int main(void) {
g_conf.m_maxMem = 1000000000LL;
g_mem.m_memtablesize = 8194*1024;
g_mem.init();
//test init/finit which involves thraed create/join
{
JobScheduler js;
js.initialize(1,1,1);
js.finalize();
}
printf("success\n");
return 0;
}