[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: Managing states
- From: Jim Mathies <jim@...>
- Date: Thu, 10 Feb 2000 11:14:46 -0800
Right, but only one thread is in the vm at any point,
correct?
I have a single process app, with multiple threads
running different Lua scripts. If two threads enter
the vm lib (compiled in a dll) at the same time - it
crashes both.
Does the multistate version of Lua allow for
multiple threads in the same lib at the same time?
Regards,
Jim Mathies
-----Original Message-----
From: erik@hougaard.com [mailto:erik@hougaard.com]
Sent: Thursday, February 10, 2000 9:44 AM
To: Multiple recipients of list
Subject: Re: Managing states
----- Original Message -----
From: "Jim Mathies" <jim@mathies.com>
To: "Multiple recipients of list" <lua-l@tecgraf.puc-rio.br>
Sent: Thursday, February 10, 2000 6:13 PM
Subject: RE: Managing states
> This is a single vm / multiple thread solution if I'm reading
> your description correctly?
>
> What about a multithreaded version of Lua? Is that on the horizon?
>
> To get around this myself in Windows, I've been experimenting
> around with compiling the Lua src into a cross platform executable
> format such as elf, and then loading it manually into memory
> on a per thread basis. My application requires a single
> Lua lib, one process, multiple threads all executing at the same time.
>
> I like the time slice idea, except - you have to call that suspend
callback
> to give up control. If a programmer doesn't do this - well, your
> program could lock up or fail. Plus, performance isn't very good
> if you have say, 10 scripts running at the same time.
>
I'm using my Multistate Lua (www.hougaard.com/lua/lua32.zip) to have a
multithreaded Windows application. I have a state in each thread!
/Erik