From e7559e91d8017119e6faa004b4946d774218ff7f Mon Sep 17 00:00:00 2001 From: voidProc Date: Mon, 23 Mar 2020 09:29:23 +0900 Subject: [PATCH] fix coroutine example: use thread state --- examples/source/docs/coroutine_thread.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/source/docs/coroutine_thread.cpp b/examples/source/docs/coroutine_thread.cpp index 5824f9aa..6cfb500b 100644 --- a/examples/source/docs/coroutine_thread.cpp +++ b/examples/source/docs/coroutine_thread.cpp @@ -24,7 +24,7 @@ end lua.script(co_lua_script); sol::thread runner = sol::thread::create(lua.lua_state()); sol::state_view runnerstate = runner.state(); - sol::coroutine loop_coroutine = lua["loop"]; + sol::coroutine loop_coroutine = runnerstate["loop"]; lua["counter"] = 20; for (int counter = 0; counter < 10 && loop_coroutine; ++counter) {