将接口调用改为线程执行,防止超时阻塞数据/状态控制线程
This commit is contained in:
@@ -32,6 +32,44 @@ class Front;
|
||||
#define RECALL_HIS_DATA_BASE_NODE_ID 600
|
||||
#define RECALL_ALL_DATA_BASE_NODE_ID 700*/
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////异步接口
|
||||
struct QvvrFileDownloadTask {
|
||||
std::string file_path;
|
||||
std::string terminal_id;
|
||||
};
|
||||
|
||||
struct QvvrJsonTask {
|
||||
std::string terminal_id;
|
||||
int line_id;
|
||||
double amplitude;
|
||||
double persist_time;
|
||||
long long trigger_time_ms;
|
||||
int type;
|
||||
int phase;
|
||||
std::string wavepath;
|
||||
};
|
||||
|
||||
// ★声明
|
||||
extern std::mutex g_qvvr_async_mtx;
|
||||
|
||||
extern std::list<QvvrFileDownloadTask> g_qvvr_file_download_list;
|
||||
|
||||
extern std::list<QvvrJsonTask> g_qvvr_json_list;
|
||||
|
||||
extern void process_qvvr_async_tasks();
|
||||
|
||||
extern void enqueue_qvvr_file_download(const std::string& file_path,
|
||||
const std::string& terminal_id);
|
||||
|
||||
extern void enqueue_qvvr_json_update(const std::string& terminal_id,
|
||||
int line_id,
|
||||
double amplitude,
|
||||
double persist_time,
|
||||
long long trigger_time_ms,
|
||||
int type,
|
||||
int phase,
|
||||
const std::string& wavepath);
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//单条补招时间结构
|
||||
|
||||
Reference in New Issue
Block a user