lean2/tests/lua/threads/th6.lua
Leonardo de Moura 5e170ce5fe chore(tests/lua): move examples that use threads to tests/lua/threads
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-15 09:11:58 -08:00

10 lines
149 B
Lua

S = State()
T = thread(S, [[
while true do
check_interrupted()
end
]])
sleep(100)
T:interrupt()
assert(not pcall(function() T:wait() end))