From 8bf1576c641f3b68bb43c50929cdcec8ee73ff86 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 16 Apr 2025 22:35:33 +0800 Subject: add native thread stub --- xmake/core/thread/thread.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xmake/core/thread/thread.lua') 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 -- cgit v1.3.1