sync home / office
This commit is contained in:
parent
517e587c35
commit
44bc9731d0
|
@ -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;
|
||||||
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) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
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) {
|
||||||
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);
|
||||||
|
|
Loading…
Reference in New Issue