refactor(stream): drop stream task

This commit is contained in:
Liu Jicong 2022-11-10 16:36:49 +08:00
parent 4afa56eb38
commit 64f22d560c
1 changed files with 1 additions and 3 deletions

View File

@ -187,11 +187,9 @@ int32_t streamMetaRemoveTask(SStreamMeta* pMeta, int32_t taskId) {
while (1) { while (1) {
int8_t schedStatus = int8_t schedStatus =
atomic_val_compare_exchange_8(&pTask->schedStatus, TASK_SCHED_STATUS__INACTIVE, TASK_SCHED_STATUS__DROPPING); atomic_val_compare_exchange_8(&pTask->schedStatus, TASK_SCHED_STATUS__INACTIVE, TASK_SCHED_STATUS__DROPPING);
if (schedStatus == TASK_SCHED_STATUS__INACTIVE) { if (schedStatus != TASK_SCHED_STATUS__ACTIVE) {
tFreeSStreamTask(pTask); tFreeSStreamTask(pTask);
break; break;
} else if (schedStatus == TASK_SCHED_STATUS__DROPPING) {
break;
} }
taosMsleep(10); taosMsleep(10);
} }