摘要:
Lua 中一对resume-yield 可以相互交换数据。co = coroutine.create(function () for i = 1, 3 do print("LUA") coroutine.yield() endend)for i = 1, 5 do coroutine.resume(co)end>lua -e "io.stdout:setvbuf 'no'" "test.lua" LUALUALUA>Exit code: 0 resume 返回除了true 以外的其他部分将作为参数传递给相应 阅读全文
posted @ 2013-05-04 00:56
梦想照进灵魂
阅读(199)
评论(0)
推荐(0)
浙公网安备 33010602011771号