#ifndef THREADPOOLS_H
#define THREADPOOLS_H
#include <cx/string.h>
#include "../public/nsapi.h"
#include "../util/thrpool.h"
#ifdef __cplusplus
extern "C" {
#endif
typedef struct thread_pool_config {
int min_threads;
int max_threads;
int stack_size;
int queue_size;
} ThreadPoolConfig;
int create_threadpool(cxstring name, ThreadPoolConfig *cfg);
int check_thread_pool_cfg();
threadpool_t* get_default_threadpool();
threadpool_t* get_threadpool(cxstring name);
threadpool_t* get_default_iopool();
threadpool_t* get_iopool(cxstring name);
void shutdown_threadpools(
void);
#ifdef __cplusplus
}
#endif
#endif