diff options
| author | ruki <[email protected]> | 2025-11-03 22:48:22 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-11-07 15:01:56 +0800 |
| commit | fa6b4470bd96c8f23133b43ba563af1a25c04a11 (patch) | |
| tree | edee660393625343e96cce51bc3ebb9eb4939487 /xmake/core/base/private/async_task.lua | |
| parent | 85980580cf9fab96edda2325b59fb315fed4a7ce (diff) | |
fix async thread
Diffstat (limited to 'xmake/core/base/private/async_task.lua')
| -rw-r--r-- | xmake/core/base/private/async_task.lua | 12 |
1 files changed, 12 insertions, 0 deletions
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() |
