refactor(stream): drop stream task
This commit is contained in:
parent
4afa56eb38
commit
64f22d560c
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue