diff options
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 |
