1
0
mirror of https://github.com/fumiama/simple-kanban.git synced 2026-06-05 00:10:29 +08:00

optimize: keep timer on send_all

This commit is contained in:
源文雨
2023-12-01 11:14:41 +09:00
parent e4ef224123
commit 651df6e390
2 changed files with 4 additions and 2 deletions

View File

@@ -17,4 +17,6 @@ typedef struct const_config_t const_config_t;
#define TCPOOL_MAXWAITSEC 16
#define TCPOOL_THREADCNT 32
#endif

View File

@@ -51,6 +51,8 @@ static uint8_t _cfg[sizeof(simple_pb_t)+sizeof(config_t)];
uint8_t isopen; /* 是否获得了文件锁 */ \
char data[SERVER_THREAD_BUFSZ]
static volatile uintptr_t is_sending_all[TCPOOL_THREADCNT];
#define TCPOOL_TOUCH_TIMER_CONDITION (is_sending_all[index])
#define TCPOOL_INIT_ACTION \
@@ -70,8 +72,6 @@ static uint8_t _cfg[sizeof(simple_pb_t)+sizeof(config_t)];
#include "tcpool.h"
static volatile uintptr_t is_sending_all[TCPOOL_THREADCNT];
/*
* check_buffer 检查接收到的数据,结合