diff options
| author | ruki <[email protected]> | 2025-04-18 22:42:48 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-08-28 11:35:53 +0800 |
| commit | ad77d170e407fc7d346df32a88683aae050bf36b (patch) | |
| tree | e1ae2f06dc31a84ae42b4dd6086cb570ef88b95b /xmake/core/thread/thread.lua | |
| parent | 6eccd1efa540d634e35eb29cf923025e0667aa0c (diff) | |
run thread
Diffstat (limited to 'xmake/core/thread/thread.lua')
| -rw-r--r-- | xmake/core/thread/thread.lua | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/xmake/core/thread/thread.lua b/xmake/core/thread/thread.lua index cac5d916d..33ac3dca0 100644 --- a/xmake/core/thread/thread.lua +++ b/xmake/core/thread/thread.lua @@ -91,11 +91,14 @@ function _instance:start() assert(not self:cdata()) -- serialize and pass callback and arguments to this thread - local callback = string.serialize(self._CALLBACK, {strip = true, indent = false}) - local argv = string.serialize(self._ARGV, {strip = true, indent = false}) + local callinfo = { + callback = self._CALLBACK, + argv = self._ARGV + } + callinfo = string.serialize(callinfo, {strip = true, indent = false}) -- init and start thread - local handle, errors = thread.thread_init(self:name(), callback, argv, self._STACKSIZE) + local handle, errors = thread.thread_init(self:name(), callinfo, self._STACKSIZE) if not handle then return nil, errors or string.format("%s: failed to create thread!", self) end |
