提交 44bc9731 编写于 作者: S shenglian zhou

sync home / office

上级 517e587c
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include "tlog.h" #include "tlog.h"
#include "tudf.h" #include "tudf.h"
#include "tudfInt.h" #include "tudfInt.h"
#include "tarray.h"
//TODO: when startup, set thread poll size. add it to cfg //TODO: when startup, set thread poll size. add it to cfg
//TODO: udfd restart when exist or aborts //TODO: udfd restart when exist or aborts
...@@ -103,6 +104,8 @@ uv_async_t gUdfLoopStopAsync; ...@@ -103,6 +104,8 @@ uv_async_t gUdfLoopStopAsync;
uv_mutex_t gUdfTaskQueueMutex; uv_mutex_t gUdfTaskQueueMutex;
int64_t gUdfTaskSeqNum = 0; int64_t gUdfTaskSeqNum = 0;
SArray* gUdfWaitResultTasks = NULL;
enum { enum {
UDFC_STATE_INITAL = 0, // initial state UDFC_STATE_INITAL = 0, // initial state
UDFC_STATE_STARTNG, // starting after startUdfService UDFC_STATE_STARTNG, // starting after startUdfService
...@@ -178,7 +181,6 @@ void udfTaskQueueMove(SClientUvTaskQueue q, SClientUvTaskQueue n) { ...@@ -178,7 +181,6 @@ void udfTaskQueueMove(SClientUvTaskQueue q, SClientUvTaskQueue n) {
} }
} }
int32_t encodeRequest(char **pBuf, int32_t *pBufLen, SUdfRequest *request) { int32_t encodeRequest(char **pBuf, int32_t *pBufLen, SUdfRequest *request) {
debugPrint("%s", "encoding request"); debugPrint("%s", "encoding request");
...@@ -846,6 +848,7 @@ void startUdfd(void *argsThread) { ...@@ -846,6 +848,7 @@ void startUdfd(void *argsThread) {
uv_async_init(&gUdfdLoop, &gUdfLoopStopAsync, udfStopAsyncCb); uv_async_init(&gUdfdLoop, &gUdfLoopStopAsync, udfStopAsyncCb);
uv_mutex_init(&gUdfTaskQueueMutex); uv_mutex_init(&gUdfTaskQueueMutex);
udfTaskQueueInit(gUdfTaskQueue); udfTaskQueueInit(gUdfTaskQueue);
gUdfWaitResultTasks = taosArrayInit(256, sizeof(SClientUvTaskNode*));
uv_barrier_wait(&gUdfInitBarrier); uv_barrier_wait(&gUdfInitBarrier);
//TODO return value of uv_run //TODO return value of uv_run
uv_run(&gUdfdLoop, UV_RUN_DEFAULT); uv_run(&gUdfdLoop, UV_RUN_DEFAULT);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册