From 3ef3fb50afdb388918fe7514d287aca753030f27 Mon Sep 17 00:00:00 2001 From: tangyuxin <462747508@qq.com> Date: Sat, 6 Feb 2021 20:15:50 +0800 Subject: [PATCH] =?UTF-8?q?[workqueue]=20=E9=98=9F=E5=88=97=E9=94=80?= =?UTF-8?q?=E6=AF=81=E6=97=B6=E5=8F=96=E6=B6=88=E6=89=80=E6=9C=89=E5=B7=A5?= =?UTF-8?q?=E4=BD=9C=E5=B9=B6=E9=87=8A=E6=94=BE=E5=86=85=E6=A0=B8=E5=AF=B9?= =?UTF-8?q?=E8=B1=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/drivers/src/workqueue.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/drivers/src/workqueue.c b/components/drivers/src/workqueue.c index eb6cefc006..474eae556b 100644 --- a/components/drivers/src/workqueue.c +++ b/components/drivers/src/workqueue.c @@ -231,7 +231,9 @@ rt_err_t rt_workqueue_destroy(struct rt_workqueue *queue) { RT_ASSERT(queue != RT_NULL); + rt_workqueue_cancel_all_work(); rt_thread_delete(queue->work_thread); + rt_sem_detach(&(queue->sem)); RT_KERNEL_FREE(queue); return RT_EOK;