lua-users home
lua-l archive

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


Dear Ben,

I might have taken extremes when I said that there might be a bug. Sorry about that. There is really no parallelism in the threads. One thread gets created, the second one is not created until the first one is over and so on. Do you still think that it is a synchronization issue?

The code is attached if you want to take a look at it
Thanks,
Ashwin Kurup

----- Original Message ----- From: "Ben Sunshine-Hill" <sneftel@gmail.com>
To: "Lua list" <lua@bazar2.conectiva.com.br>
Sent: Tuesday, February 22, 2005 1:12 PM
Subject: Re: lua_newthread problems


Ashwin,

Just as an initial reaction, how are you ensuring synchronization of
the Lua state between the system threads? This sounds very much like a
synchronization problem in your code. I'd suggest the excellent
LuaThread library; it has these messy issues all worked out.

BTW, I note that this is the second thread in a row you've posted
suggesting that a problem you are experiencing in your code is caused
by a bug in Lua. You may find this to be a useful link:

http://www.catb.org/~esr/faqs/smart-questions.html#id3001405

HTH,

Ben

Attachment: SharedContextVaryAPICallsWithThreads.lua
Description: Binary data