local thread = require("thread") local t = thread.create(function() print("before sleep") os.sleep() print("after sleep") end) print(t:status())