be9840d1c0
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.
20 lines
307 B
C++
20 lines
307 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 plain instantiation of the bridge
|
|
{
|
|
JobScheduler js;
|
|
}
|
|
|
|
printf("success\n");
|
|
return 0;
|
|
}
|