| 17 | static threadpool _writers_thpool = NULL; // writers |
| 18 | |
| 19 | int 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 |
no test coverage detected