[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: my module crashes when used with lanes
- From: Ignacio Burgueño <ignaciob@...>
- Date: Fri, 11 Dec 2009 13:16:56 -0200
Benoit Germain wrote:
I suppose that when the script execution terminates, the main thread is collected, as should be the the still-running lane. However, the output becomes:
luaopen_xbdm: threadId = 2452
luaopen_xbdm: threadId = 3404
luaxbdm_gc: userdata threadId = 2452, current thread id = 2452
Where has the second __gc call gone?
If you have LuaSocket handy, try this:
local function laneFunc()
local lanegen = lanes.gen( "package", laneFunc)
local mylane = lanegen()
It should call __gc now. I think that in your example, the lanes are
just terminated by the OS.