kaguya icon indicating copy to clipboard operation
kaguya copied to clipboard

how can I check function has timeout

Open EternalHunters opened this issue 4 years ago • 1 comments

I need check is timeout when run a lua function,if timeout, then break it

EternalHunters avatar Apr 23 '20 08:04 EternalHunters

Lua is synchronous. The only way this can work is if you run your Lua function in a separate thread (and I'm not sure if Lua/Kaguya are thread-safe or not so this might be a bit more tricky) and implement a thread timeout in C++.

Philanatidae avatar May 14 '20 16:05 Philanatidae