MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / ThreadPools_Init

Function ThreadPools_Init

src/util/thpool/pools.c:19–37  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17static threadpool _writers_thpool = NULL; // writers
18
19int ThreadPools_Init
20(
21) {
22 bool config_read = true;
23 int reader_count = 1;
24 int writer_count = 1;
25 uint64_t max_queue_size = UINT64_MAX;
26
27 UNUSED(config_read);
28
29 // get thread pool size and thread pool internal queue length from config
30 config_read = Config_Option_get(Config_THREAD_POOL_SIZE, &reader_count);
31 ASSERT(config_read == true);
32
33 config_read = Config_Option_get(Config_MAX_QUEUED_QUERIES, &max_queue_size);
34 ASSERT(config_read == true);
35
36 return ThreadPools_CreatePools(reader_count, writer_count, max_queue_size);
37}
38
39// set up thread pools (readers and writers)
40// returns 1 if thread pools initialized, 0 otherwise

Callers 1

RedisModule_OnLoadFunction · 0.85

Calls 2

Config_Option_getFunction · 0.85
ThreadPools_CreatePoolsFunction · 0.85

Tested by

no test coverage detected