summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
authorruki <[email protected]>2025-04-16 22:35:33 +0800
committerruki <[email protected]>2025-08-28 11:35:53 +0800
commit8bf1576c641f3b68bb43c50929cdcec8ee73ff86 (patch)
treececd4927e8466e076687f6b23d60f00a06023aae /xmake
parentd985de5de38fb0d041f8e9182c076575603b5b4f (diff)
add native thread stub
Diffstat (limited to 'xmake')
-rw-r--r--xmake/core/thread/thread.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/xmake/core/thread/thread.lua b/xmake/core/thread/thread.lua
index 3a3de2705..4137efe3e 100644
--- a/xmake/core/thread/thread.lua
+++ b/xmake/core/thread/thread.lua
@@ -90,7 +90,7 @@ function _instance:start()
end
assert(not self:cdata())
- local handle, errors = thread.thread_create(self:name(), self._CALLBACK, self._ARGV, self._STACKSIZE)
+ local handle, errors = thread.thread_init(self:name(), self._CALLBACK, self._ARGV, self._STACKSIZE)
if not handle then
return nil, errors or string.format("%s: failed to create thread!", self)
end
@@ -169,7 +169,7 @@ end
-- gc(thread)
function _instance:__gc()
- if self:cdata() and self:is_dead() and io.thread_close(self:cdata()) then
+ if self:cdata() and self:is_dead() and io.thread_exit(self:cdata()) then
self._HANLDE = nil
end
end