0

I‘m reading code of TDengine database

but I don't understand what the SSchedQueue is used for .

and what the SSchedMsg is?

enter image description here

Yu Chen
  • 70
  • 1
  • 5

1 Answers1

0

I think it is a scheduler which is used for scheduling task in TDengine database.

like this :

int32_t taosAsyncExec(__async_exec_fn_t execFn, void* execParam, int32_t* code) {
  assert(execFn != NULL);

  SSchedMsg schedMsg = {0};
  schedMsg.fp = execHelper;
  schedMsg.ahandle = execFn;
  schedMsg.thandle = execParam;
  schedMsg.msg = code;

  return taosScheduleTask(&pTaskQueue, &schedMsg);
}

here , &pTaskQueue is a SSchedQueue.

Yu Chen
  • 70
  • 1
  • 5