I have a Qt-Application written in C++. It's a generic Tool for testing hardware. The specific tests are defined in a lua-script.
In my script i have a function called 'RunTests()' which is called in a QThread in the Qt-Application. I put it into a QThread in order to prevent the script from freezing my application. Now there's another function in the lua script, called 'Interrupt()' which should be called sometimes by the Qt-Application during the tests. So now everytime I call this function 'Interrupt()' with lua_getglobal() my Qt-Application crashes.
How can I run those 2 Lua functions at the same time or how can I interrupt 'RunTests()' to call 'Interrupt()' and then move back to 'RunTests()'?