lua-users home
lua-l archive

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

I have found the lua51pthread 'module' and it seems great, but its only one way to do this sort of thing, and it requires intrusion into the lua core, so its not really a module in that sense.  Has anyone else written or found a threading implimentation that they like/dislike?  I wanted to look at the different ways people are doing this.  I have the beginings of an idea of my own that would not require modification of the core, and thus could be a pure module.

On that note, is it possible to put an index table on the global table?  I would use this to hook mutexes to 'global' variables by calling a cfunction that would index into the real global table in its own thread (probably the main thread) and locking the mutex during access.  Basicly all lua 'threads' would be technically isolated from each other except for this controlled access.  Other local variables could be 'marked' as thread variables if you wanted to pass them between threads, for instance during thread instantiation.

Does this even sound like a possibility?