10 2014 档案
lua-coroutine
摘要:两个协程,通过resume/yield函数参数(或者return语句)向对方传送数据,通过resume/yield函数返回值来从对方处获取传送数据 function coroutine_func(resume1.Args)yield1 return resume2.Argsyield2 return... 阅读全文
posted @ 2014-10-23 16:31 zReachzer 阅读(164) 评论(0) 推荐(0)
unix环境高级编程-7-process env
摘要:1. exit handler. atexit(void (*func)(void)); #automatically called by exit() exit() calls these functions in reverse order of their registeration.... 阅读全文
posted @ 2014-10-14 15:56 zReachzer 阅读(135) 评论(0) 推荐(0)
programming in lua
摘要:一. function1. 作为表达式或参数时,只有调用是最后一个表达式或参数时才会获得所有结果,其余的只能获得第一个结果(函数没返回值时,第一个结果是nil) 1) 表达式: .. = f1(), f2(), f3() 2) 参数: F(f1(), f2(), f3()) ... 阅读全文
posted @ 2014-10-14 10:25 zReachzer 阅读(168) 评论(0) 推荐(0)