limit index bg thread

This commit is contained in:
Yihao Deng 2024-04-18 02:57:53 +00:00
parent c43c0cf427
commit 03f1250b93
1 changed files with 5 additions and 2 deletions

View File

@ -26,6 +26,8 @@
#include "tsched.h"
#define INDEX_NUM_OF_THREADS 5
#define INDEX_MAX_NUM_OF_THREADS 10
#define INDEX_QUEUE_SIZE 200
#define INDEX_DATA_BOOL_NULL 0x02
@ -61,6 +63,7 @@ static void indexDestroy(void* sIdx);
void indexInit(int32_t threadNum) {
indexThreads = threadNum;
if (indexThreads <= 1) indexThreads = INDEX_NUM_OF_THREADS;
if (indexThreads >= INDEX_MAX_NUM_OF_THREADS) indexThreads = INDEX_MAX_NUM_OF_THREADS;
}
void indexEnvInit() {
// refactor later