lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



----- Original Message ----- From: "李慧霸" <magazine.lihuiba@163.com>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Friday, January 02, 2009 12:08 PM
Subject: Re: implementing a future in lua


Yielding across metamethods seem not to be supported. In contrast, lanes doesn't
need to yield, they just block to wait for results from other preemptive
threads.

Sorry I hadn't thought of that. Coco's probably the best solution, but if you prefer to keep ansi c there is the http://lua-users.org/wiki/ResumableVmPatch. Or perhaps do away with the metamethods idea and modify c side, but it still won't be easy/neat. Good luck :).

- Alex