lua-users home
lua-l archive

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

I am using Lua in a delphi Application and have been doing so for
quite some time, recently we decided to look into multi threading. We
are have successfully compiled the LuaThread library and the demo

local function flood(output, word)
    while 1 do 
        io.write(word, ", ")

local output = thread.newmutex()
thread.newthread(flood, {output, "child"})
flood(output, "parent")

works sometimes in my implementation, when I call certain functions
defined in the Delphi app things go bad. The function itself is
threadsafe except for the Lua handling code...

I assume that something needs to be changed, looking at the source of
LuaThreads I cannot figure out what I have to do, can someone point
me in the right direction. Feel free to post C code I can translate it.


- Ron