代码拉取完成,页面将自动刷新
同步操作将从 siasjack/libthpool 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
//
// libthpool.h
// libthpool
//
// Created by 陈健康 on 2019/11/12.
// Copyright © 2019 陈健康. All rights reserved.
//
#ifndef libthpool_h
#define libthpool_h
#define OPCODE_SUCCESS 0
#define OPCODE_FAILURE -1
#define OPCODE_ERR_PARA -2
#define OPCODE_ERR_BIND_DEV -3
#define OPCODE_ERR_BIND_PORT -4
#define OPCODE_ERR_ILLEGAL_FD -5
#define OPCODE_ERR_BUSY -6
typedef struct threadpool_t threadpool_t;
typedef void(*task_func)(void *arg);
typedef struct task_data{
//this arg must set like malloc,libthpool will call free(arg)
void *arg;
task_func task_func;
}libthpool_taskdata_t;
threadpool_t * libthpool_init(int min_thr_num, int max_thr_num, int queue_max_size);
int libthpool_destroy(threadpool_t *pool);
int libthpool_task_put(threadpool_t *pool, task_func function, void *arg);
int libthpool_state(int *task_queue,int *live_thr_num,int *busy_thr_num);
#endif /* libthpool_h */
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。