From fa6b4470bd96c8f23133b43ba563af1a25c04a11 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 3 Nov 2025 22:48:22 +0800 Subject: fix async thread --- xmake/core/base/private/async_task.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'xmake/core/base/private/async_task.lua') diff --git a/xmake/core/base/private/async_task.lua b/xmake/core/base/private/async_task.lua index 1356072e5..a6116c5a0 100644 --- a/xmake/core/base/private/async_task.lua +++ b/xmake/core/base/private/async_task.lua @@ -135,6 +135,10 @@ function async_task.cp(srcpath, dstpath, opt) return false, errors end + -- TODO + assert(opt.detach) + + -- post task srcpath = path.absolute(tostring(srcpath)) dstpath = path.absolute(tostring(dstpath)) task_queue:push({kind = "cp", srcpath = srcpath, dstpath = dstpath}) @@ -150,6 +154,10 @@ function async_task.rm(filepath, opt) return false, errors end + -- TODO + assert(opt.detach) + + -- post task filepath = path.absolute(tostring(filepath)) task_queue:push({kind = "rm", filepath = filepath}) task_event:post() @@ -164,6 +172,10 @@ function async_task.rmdir(dir, opt) return false, errors end + -- TODO + assert(opt.detach) + + -- post task dir = path.absolute(tostring(dir)) task_queue:push({kind = "rmdir", dir = dir}) task_event:post() -- cgit v1.3.1