lua-users home
lua-l archive

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


I would appreciate it tremendously if you could try to recreate this interaction issue between Lanes and LuaJIT. I really need a threading solution (more than co-routines) and it looks like Lanes would serve that purpose excellently. I originally encountered the problem of marshalling byte-codes between LuaJIT and Lanes in the earlier version of Lanes. It would appear this problem has been solved in the newer v3.1.0 release.

I'm fairly new to Lua so I am trying to understand what may be going on. As I understand it, Lanes hijacks "require" so that it can detect when new modules are being loaded. This seems to imply that Lanes *must* be the first module loaded and lanes.configure() must be called *before* any other modules are loaded. Is this understanding correct?

If this is true, I can see how this might be a problem with LuaJIT since both the FFI and BitOps modules appear to be "builtin" to the VM (and thus already exist when Lanes is first imported). Is there any way to tell Lanes that these modules have been pre-loaded? Is it possible to relax the rules so that Lanes doesn't kick out when it detects this? If this is possible, what is the impact to Lanes and the modules that are pre-loaded before Lanes? I might be able to handle additional limitations in my code if Lanes can be relaxed.

Finally, can you point out in your Lanes code where this check is made (and it's aborting)? I'm just trying to understand this better and suspect I have a lot to learn.

I look forward to your findings. If anyone else has been able to use Lanes with LuaJIT2 then I would be very interested in hearing about it (and any techniques that had to be employed to get it to work).

Also, it was not apparent to me that the link you suggested (http://lua-users.org/lists/lua-l/2011-11/msg00060.html ) was applicable to this problem. Perhaps I'm missing something.

I appreciate any suggestions and support you can provide . . .

On Tue, Apr 24, 2012 at 3:59 AM, Benoit Germain <bnt.germain@gmail.com> wrote:
2012/4/24 Schmottlach, Glenn <Glenn.Schmottlach@xs-embedded.com>

I'm having difficulty using LuaLanes (v.3.1.0 tag) with LuaJIT 2.0.0-beta9 on an ARM platform. LuaJIT runs fine but if I have a simple program that does the following:

local lanes = require "lanes"
lanes.configure()

I get the following error:



BTW, have you read http://lua-users.org/lists/lua-l/2011-11/msg00060.html ? Maybe this could help as well.
 


--
Benoit.