Rubikoid
Rubikoid

Reputation: 3

Stopping infinitive loop in lupa in thread

I have function, which run some unknown code in LuaRuntime in thread, ex

def lua(code):
    lua = LuaRuntime()
    lua.execute(code)

def lua_in_thread(code):
    t = threading.Thread(target = lua, args = (code,))
    t.start()
    return t

Where code is

a = 1
while a == 1 do end

Is there any way to stop the thread? I read about check for variable in condition of infinitive loop, but there code unknown, and I can not guarantee that there will be such a check.

Upvotes: 0

Views: 103

Answers (0)

Related Questions